zakki / cgos

Computer Go Server mirror
10 stars 4 forks source link

Some potential bug report. #3

Closed CGLemon closed 1 year ago

CGLemon commented 1 year ago

@zakki

The python-client can not work on the Ubuntu. Are your environment Windows? Because the python behavior may be difference between two OS. I want to check it first. Thanks!

zakki commented 1 year ago

Maybe it's because of difference between python 2 and 3. Could you try develop HEAD?

CGLemon commented 1 year ago

Thanks! The last python-client is working. But my server said the db.execute(...).fetchone() is None type.

https://github.com/zakki/cgos/blob/52021196e4db00d15c1ad8fc916f0b25a306d399/server-python/cgos/app/cgos.py#L1394-L1396

The error report is

TypeError: 'NoneType' object is not subscriptable

What's possible wrong with it?

zakki commented 1 year ago

Perhaps this insert statement during initialization failed. https://github.com/zakki/cgos/blob/52021196e4db00d15c1ad8fc916f0b25a306d399/server-python/cgos/app/cgos.py#L192

Manualy sqlite3 /home/cgosboar/19x19/cgos.state and INSERT into gameid VALUES(1); would fix it.

I got that error once, but I dont' have detail yet.

zakki commented 1 year ago

I added commit() to other update statements.

CGLemon commented 1 year ago

The GTP client must read the stderr string. If stderr buffer is full, the client may not read stdout string.

OS: Ubuntu 20.04 python version: 3.8

zakki commented 1 year ago

Default paramter of subprocess.Popen is stderr=None, so I think that AI's stderr is just redirected to cgos client's stderr. https://github.com/zakki/cgos/blob/genmove_analyze/client-python/src/gtpengine.py#L154

Do you use stderr=subprocess.PIPE?

CGLemon commented 1 year ago

Sorry, I suffered this issue in my project. So I guess there is a same issue here. It is my mistake.