Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some potential bug report. #3

Closed
CGLemon opened this issue Jan 3, 2023 · 7 comments
Closed

Some potential bug report. #3

CGLemon opened this issue Jan 3, 2023 · 7 comments

Comments

@CGLemon
Copy link
Contributor

CGLemon commented Jan 3, 2023

@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
Copy link
Owner

zakki commented Jan 3, 2023

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

@CGLemon
Copy link
Contributor Author

CGLemon commented Jan 3, 2023

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

gid = db.execute(
"SELECT gid FROM gameid WHERE ROWID=1"
).fetchone()[0]

The error report is

TypeError: 'NoneType' object is not subscriptable

What's possible wrong with it?

@zakki
Copy link
Owner

zakki commented Jan 3, 2023

Perhaps this insert statement during initialization failed.

conn.execute("INSERT into gameid VALUES(1)")

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.

@CGLemon CGLemon changed the title Check the environment. Some potential bug report. Jan 3, 2023
@zakki
Copy link
Owner

zakki commented Jan 4, 2023

I added commit() to other update statements.

@CGLemon
Copy link
Contributor Author

CGLemon commented Jan 12, 2023

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
Copy link
Owner

zakki commented Jan 13, 2023

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
Copy link
Contributor Author

CGLemon commented Jan 13, 2023

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

@zakki zakki closed this as completed Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants