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

python3でCSA.pyが動かない #1

Closed
YusukeSuzuki opened this issue Oct 15, 2016 · 1 comment
Closed

python3でCSA.pyが動かない #1

YusukeSuzuki opened this issue Oct 15, 2016 · 1 comment

Comments

@YusukeSuzuki
Copy link

python3 で random_csa_tcp_match を動かそうとすると以下のエラーが出ます。

Traceback (most recent call last):
  File "./random_csa_tcp_match", line 23, in <module>
    ct.login(sys.argv[2], sys.argv[3])
  File "......./python-shogi/shogi/CSA.py", line 377, in login
    line = self.command('LOGIN {0} {1}'.format(username, password))
  File "......./python-shogi/shogi/CSA.py", line 335, in command
    self.write(command + '\n')
  File "......./python-shogi/shogi/CSA.py", line 340, in write
    self.socket.sendall(buf)
TypeError: a bytes-like object is required, not 'str'

bufにencode(), decode()をつければpython3でも動きますがpython2と互換のコードになっているかわからずプルリクエストが出せません。

@gunyarakun
Copy link
Owner

ついに気がついた人が現れました。
https://twitter.com/tasukuchan/status/612723416492212225

b9b719f で修正しました。

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