Invalid Literal Stockfish python 3.10

168 Views Asked by At

I am trying to use the stockfish package in python on Linux, and I'm running into a rather odd error. I downloaded the zip file from the official repo:

https://github.com/official-stockfish/Stockfish

And I've unzipped it and used the makefile to compile it. However, when I try to initialize stockfish in any bit of actual code:

stockfish = Stockfish(path = "/username/Chess/Engines/Stockfish-master/src/stockfish")

I get the following error:

File "/username/.conda/envs/alpha/lib/python3.10/site-packages/stockfish/models.py", line 57, in __init__ 
self._stockfish_major_version: int = int(
ValueError: invalid literal for int with base 10: 'dev202211114nogit'

I've tried a couple of the unofficial binaries for linux as well (found here: https://stockfishchess.org/download/linux/), and they've also given me the same error, albeit with a slightly different string in the final line.

I'm really unsure as to what's going on, since I've tested my installation method on a different (much weaker, hence my desire to fix this issue) computer, and it worked fine with all the same setup. I'm using python 3.10, with stockfish 3.28.0. If anyone has experience with this particular issue, or if they have any advice as to how to begin solving it, I would sincerely appreciate it. If there are any details that I've omitted that might be of use, please let me know and I'll edit them in. Cheers.

0

There are 0 best solutions below