greghope667 / square-off-remote

GNU General Public License v3.0
1 stars 2 forks source link

[ Issue] lichess_board.py : ConnectionResetError: [Errno 104] Connection reset by peer #7

Closed eqikkwkp25-cyber closed 7 months ago

eqikkwkp25-cyber commented 7 months ago

I got below error

env) pi@raspberrypi:~/devel/square-off-remote $ python3 lichess_board.py 
Searching for device...
Found device, connecting...
Connected
Connected, battery =  2-80
Listening for game start event...
Traceback (most recent call last):
  File "/home/pi/devel/square-off-remote/lichess_board.py", line 90, in <module>
    main()
  File "/home/pi/devel/square-off-remote/lichess_board.py", line 63, in main
    game_details = find_game()
                   ^^^^^^^^^^^
  File "/home/pi/devel/square-off-remote/lichess_board.py", line 31, in find_game
    for event in stream("/api/stream/event"):
  File "/home/pi/devel/square-off-remote/lichess_board.py", line 23, in stream
    response = request(endpoint)
               ^^^^^^^^^^^^^^^^^
  File "/home/pi/devel/square-off-remote/lichess_board.py", line 13, in request
    conn.request(method, endpoint, headers=headers)
  File "/usr/lib/python3.11/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.11/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3.11/http/client.py", line 1454, in connect
    self.sock = self._context.wrap_socket(self.sock,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1075, in _create
    self.do_handshake()
  File "/usr/lib/python3.11/ssl.py", line 1346, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
Device was disconnected
eqikkwkp25-cyber commented 7 months ago

Looks like a temporary issue. I played a game versus Maia1 bot today. Once I challenged the bot on the PC it worked out and I could play on GKS in sync with the PC. Great.