bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cube-info dictionary type error on linux cli using Python 3.9.2


From: Christian Anthon
Subject: Re: Cube-info dictionary type error on linux cli using Python 3.9.2
Date: Tue, 22 Feb 2022 15:39:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Yeah, no code is going to work on both python2 and python3. Feel free to post a bug report on https://savannah.gnu.org/bugs/?group=gnubg, but this is not likely to be a priority. You are also welcome to update the c code if you know a little c and python, it probably isn't difficult.

C


On 2/19/22 11:53, Rose Menninger wrote:
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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]