Pathing problems
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
FileNotFoundError: [Errno 2] No such file or directory: 'Engines'
Try to use the git clone command to get all the files in this repo.
- create a temp folder say temp_cg
- cd to that folder
- send command via command prompt
git cone https://github.com/fsmosca/Python-Easy-Chess-GUI.git
- cd to python easy chess gui folder
- run the script with
python python_easy_chess_gui.py
Ok this worked to pull up the GUI. None of the engines in the engines folder work when I try to install them.
There is an engine from stockfish for mac. https://stockfishchess.org/download/
I am not familiar with macos.