The ArgumentError is presumably because you're passing a wrong argument. so it seemingly fixed a problem but the next instantly occured. No other stockfish related "commands" will work: OSError: Invalid argument. The default value for the path you give is "stockfish", so if you add your directory with the executables to the path, and rename the exe you want to stockfish, you should be able to do: from stockfish import Stockfish Stockfish = Stockfish(r'C:\Users\\Downloads\stockfish-11-win\Windows\stockfish_20011801_圆4.exe') To use the executable, give the path to the executable like so: from stockfish import Stockfish The executables are in C:\Users\\Downloads\stockfish-11-win\Windows I extracted it to C:\Users\\Downloads\stockfish-11-win If you download the v11 zip from the Stockfish website, extract it and find the directories with the executables. The argument needs to point to the Stockfish executable. I tried different Stockfish Downloads, running the Idle or CMD as admin, re-installed and used different PCs, but I somehow don't get to work with Stockfish - anyone able to help me out bypassing the access denied? What do I miss when initializing? Hp, ht, pid, tid = _winapi.CreateProcess(executable, args, Self._execute_child(args, executable, preexec_fn, close_fds,įile "C:\Users\Acer\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1307, in _execute_child That throws a WinError 5, access denied: Exception ignored in: įile "C:\Users\Acer\AppData\Local\Programs\Python\Python38-32\lib\site-packages\stockfish\models.py", line 270, in _del_ĪttributeError: 'Stockfish' object has no attribute 'stockfish'Įmily = Stockfish(r'C:\Users\Acer\Desktop\chess\stockfish-11-win\src')įile "C:\Users\Acer\AppData\Local\Programs\Python\Python38-32\lib\site-packages\stockfish\models.py", line 33, in _init_įile "C:\Users\Acer\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 854, in _init_ Stockfish = Stockfish(r'C:\Users\Acer\Desktop\chess\stockfish-11-win') So I went on and tried to setup the Stockfish via: from stockfish import Stockfish I installed it via pip install stockfish. Basically, I'm trying to setup stockfish with Python on my PC. I know this isn't a programming forum, though it's chess-related, hence the placement on here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |