staubsauger / ChessnutPy

GNU General Public License v3.0
14 stars 3 forks source link

Crash on disconnect... #8

Closed staubsauger closed 1 year ago

staubsauger commented 1 year ago

INFO:root:r . b q k b n r p p p p . p p p . . n . . . . . . . . . p . . . . . . . P . . . . . . . . N . . P P P P . P P P R N B Q K B . R INFO:root:Move-stack: ['e2e4', 'e7e5', 'g1f3', 'b8c6'] INFO:root:Player move: b8c6 INFO:root:[('C44a', 'Open Game')] INFO:root:generated Move: f1c4 INFO:root:board incorrect! please fix INFO:root:piece: f1 at B up INFO:root:piece: B at c4 down INFO:root:board fixed! r1bqkbnr/pppp1ppp/2n5/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 3 3 INFO:root:[('C50a', 'Italian Game')] ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-2' coro=<ChessnutAir.run() done, defined at /home/chess/chessnut/ChessnutPy/ChessnutAir.py:224> exception=EOFError()> Traceback (most recent call last): File "/home/chess/chessnut/ChessnutPy/ChessnutAir.py", line 246, in run await self.game_loop() # call user game loop ^^^^^^^^^^^^^^^^^^^^^^ File "/home/chess/chessnut/ChessnutPy/BoardGame.py", line 538, in game_loop await self.game_loop() File "/home/chess/chessnut/ChessnutPy/BoardGame.py", line 501, in game_loop await self.maybe_read_board() File "/home/chess/chessnut/ChessnutPy/BoardGame.py", line 554, in maybe_read_board await self.fix_board() File "/home/chess/chessnut/ChessnutPy/BoardGame.py", line 319, in fix_board await self.blink_tick(sleep_time=0.3) File "/home/chess/chessnut/ChessnutPy/ChessnutAir.py", line 73, in blink_tick await self.change_leds(self.to_light) File "/home/chess/chessnut/ChessnutPy/ChessnutAir.py", line 155, in change_leds await self._connection.write_gatt_char(constants.BtCharacteristics.write, self._led_command + arr) File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/bleak/init.py", line 593, in write_gatt_char await self._backend.write_gatt_char(char_specifier, data, response) File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 752, in write_gatt_char raise BleakError("Not connected") bleak.exc.BleakError: Not connected

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/chess/chessnut/ChessnutPy/ChessnutAir.py", line 253, in run await self.run() File "/home/chess/chessnut/ChessnutPy/ChessnutAir.py", line 246, in run await self.game_loop() # call user game loop ^^^^^^^^^^^^^^^^^^^^^^ File "/home/chess/chessnut/ChessnutPy/BoardGame.py", line 538, in game_loop await self.game_loop() File "/home/chess/chessnut/ChessnutPy/BoardGame.py", line 531, in game_loop await self.blink_tick(sleep_time=0.3) File "/home/chess/chessnut/ChessnutPy/ChessnutAir.py", line 71, in blink_tick await self.change_leds(self.to_blink.union(self.to_light)) File "/home/chess/chessnut/ChessnutPy/ChessnutAir.py", line 155, in change_leds await self._connection.write_gatt_char(constants.BtCharacteristics.write, self._led_command + arr) File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/bleak/init.py", line 593, in write_gatt_char await self._backend.write_gatt_char(char_specifier, data, response) File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 788, in write_gatt_char reply = await self._bus.call( ^^^^^^^^^^^^^^^^^^^^^ File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/dbus_fast/aio/message_bus.py", line 371, in call await future File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/dbus_fast/aio/message_reader.py", line 24, in _message_reader message = unmarshaller._unmarshall() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/dbus_fast/_private/unmarshaller.py", line 659, in _unmarshall self._read_header() File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/dbus_fast/_private/unmarshaller.py", line 533, in _read_header self._read_to_pos(HEADER_SIGNATURE_SIZE) File "/home/chess/chessnut/ChessnutPy/chess-env/lib/python3.11/site-packages/dbus_fast/_private/unmarshaller.py", line 283, in _read_to_pos raise EOFError() EOFError