Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pathing problems #51

Open
macgormain opened this issue Mar 9, 2023 · 3 comments
Open

Pathing problems #51

macgormain opened this issue Mar 9, 2023 · 3 comments
Labels

Comments

@macgormain
Copy link

macgormain commented Mar 9, 2023

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

@fsmosca
Copy link
Owner

fsmosca commented Mar 9, 2023

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

@macgormain
Copy link
Author

Ok this worked to pull up the GUI. None of the engines in the engines folder work when I try to install them.

@fsmosca
Copy link
Owner

fsmosca commented Mar 10, 2023

There is an engine from stockfish for mac. https://stockfishchess.org/download/

I am not familiar with macos.

@fsmosca fsmosca added the OS: OSX label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants