[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cube-info dictionary type error on linux cli using Python 3.9.2
From: |
Rose Menninger |
Subject: |
Cube-info dictionary type error on linux cli using Python 3.9.2 |
Date: |
Sat, 19 Feb 2022 14:23:49 +0330 |
Hi. First of all, thanks for your efforts in creating such a good software /
package. I have been using gnubg cli in the last few years and really enjoyed
it. But recently I have encountered a weird error.
Using Gnubg 1.06.002 on Debian 11 (wirh Python 3.9.2) and also on ubuntu 20.4
lts (with Python 3.8.10), every Python script that uses “cube-info” dictionary
as argument, gives this type error:
TypeError: expected bytes, str found
Steps to reproduce this error:
Using gnubg 1.06.002 and Python 3.9.2 on linux
1- start cli using “gnubg -t”
2- start a new game using “new game”
3- set turn using “set turn 1”
4- set dice using “set dice 6 2”
5- enter Python command line using “>”
6- passing cube-info dictionary to any of gnubg methods that accept it as
argument. For example:
myCubeInfo = gnubg.cubeinfo()
gnubg.calcgammonprice(myCubeInfo)
Expected result: cube-info with updated gammon prices
Result:
TypeError: expected bytes, str found
Note that the same code was working on older versions on gnubg. This same exact
code also works correctly on gnubg 1.06.002 on Mac OS using Python 2.7.18. So,
this error seems to be related to Python > 3.8.10. I have also built latest cvs
version from savannah on a fresh and updated debian 11, but still got this same
exact error.
Also, every other gnubg method that accepts “cube-info” dictionary results in
the same exact error (calcgammonprice, cfevaluate, eq2mwc…). Everything else
works as expected as far as I can see.
I have been struggling with this error for 3 weeks, searching about it on
different forums and reproducing it on different machines. Am I missing
something?
Any help is greatly appreciated.
Thanks
- Cube-info dictionary type error on linux cli using Python 3.9.2,
Rose Menninger <=