pnprog / goreviewpartner

A tool to help analyse and review your game of go (weiqi, baduk) using strong bots.
GNU General Public License v3.0
285 stars 66 forks source link

Python 3 issues #143

Closed mikekyle closed 2 years ago

mikekyle commented 3 years ago

Hi. Hope it's not too cheeky to ask. There's some really nice useful modules in here and I've been using them for some very off-label purposes. Recently I've been having a go at updating to Python 3.8. A lot of it seems to go fine but I always get issues with some of the command line Popen pipe reading and writing which seems to have changed. The program hangs on the line in gtp.py: answer=self.process.stdout.readline().decode("utf-8") But never seems to receive a response. I'm not actually sure if it's a problem with the readline though? or if the write didn't work properly? self.process.stdin.write(txt+b"\r\n") I'm not sure if pnprog or anyone who's likely to read this will have tried doing this and had the same problems?

cryptsport commented 3 years ago

@mikekyle https://docs.python.org/2/library/popen2.html https://stackoverflow.com/questions/2365411/convert-unicode-to-ascii-without-errors-in-python