Skip to content

Pathing problems #51

Open
Open
@macgormain

Description

@macgormain

When trying to test the program I am consistenly having pathing issues from running commands in MacOS. I have tried from both with VSCode and directly from terminal. Both in VENV and not. I was finally able to move past the file itself being inaccessible by using the absolute path but then ran into pathing issues for the assets themselves. This:

(base) thisaintyocompgetoff@nonyas-MacBook-Air pkmn_chs % python "/Users/thisaintyocompgetoff/Desktop/Coding/pkmn_chs/chess_env/lib/python3.9/site-packages/Python-Easy-Chess-GUI/python_easy_chess_gui.py" 

Returned this:

Traceback (most recent call last):
  File "/Users/thisaintyocompgetoff/Desktop/Coding/pkmn_chs/chess_env/lib/python3.9/site-packages/Python-Easy-Chess-GUI/python_easy_chess_gui.py", line 3578, in <module>
    main()
  File "/Users/thisaintyocompgetoff/Desktop/Coding/pkmn_chs/chess_env/lib/python3.9/site-packages/Python-Easy-Chess-GUI/python_easy_chess_gui.py", line 3574, in main
    pecg.main_loop()
  File "/Users/thisaintyocompgetoff/Desktop/Coding/pkmn_chs/chess_env/lib/python3.9/site-packages/Python-Easy-Chess-GUI/python_easy_chess_gui.py", line 2579, in main_loop
    self.check_engine_config_file()
  File "/Users/thisaintyocompgetoff/Desktop/Coding/pkmn_chs/chess_env/lib/python3.9/site-packages/Python-Easy-Chess-GUI/python_easy_chess_gui.py", line 1163, in check_engine_config_file
    self.engine_file_list = self.get_engines()
  File "/Users/thisaintyocompgetoff/Desktop/Coding/pkmn_chs/chess_env/lib/python3.9/site-packages/Python-Easy-Chess-GUI/python_easy_chess_gui.py", line 2412, in get_engines
    files = os.listdir(engine_path)
FileNotFoundError: [Errno 2] No such file or directory: 'Engines'

I have gotten similar errors for the images for the pieces on the board.

Is there a way to fix this without manually changing every path to its absolute path? I want to build on top of this so that seems like it would stop the project before it starts.

I am on MacOS Monterrey 12.6.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions