Created
December 3, 2023 01:49
-
-
Save diamondburned/023c79f5a468a65d67af938f2e3be417 to your computer and use it in GitHub Desktop.
libacmchristmas==0.1.4 error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 963, in transfer_data | |
message = await self.read_message() | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1033, in read_message | |
frame = await self.read_data_frame(max_size=self.max_size) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1108, in read_data_frame | |
frame = await self.read_frame(max_size) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1165, in read_frame | |
frame = await Frame.read( | |
^^^^^^^^^^^^^^^^^ | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/framing.py", line 68, in read | |
data = await reader(2) | |
^^^^^^^^^^^^^^^ | |
File "/nix/store/qp5zys77biz7imbk6yy85q5pdv7qk84j-python3-3.11.6/lib/python3.11/asyncio/streams.py", line 730, in readexactly | |
raise exceptions.IncompleteReadError(incomplete, n) | |
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "<frozen runpy>", line 198, in _run_module_as_main | |
File "<frozen runpy>", line 88, in _run_code | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/main.py", line 23, in <module> | |
loop.run_until_complete(main()) | |
File "/nix/store/qp5zys77biz7imbk6yy85q5pdv7qk84j-python3-3.11.6/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete | |
return future.result() | |
^^^^^^^^^^^^^^^ | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/main.py", line 12, in main | |
await tree.connect() | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/libacmchristmas/tree.py", line 24, in connect | |
res = (await self._send(c.GetLEDCanvasInfoRequest())).get_led_canvas_info | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/libacmchristmas/tree.py", line 57, in _send | |
resp.ParseFromString(await self.ws.recv()) | |
^^^^^^^^^^^^^^^^^^^^ | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 568, in recv | |
await self.ensure_open() | |
File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 939, in ensure_open | |
raise self.connection_closed_exc() | |
websockets.exceptions.ConnectionClosedError: no close frame received or sent | |
exit status 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import asyncio | |
import libacmchristmas.tree | |
import libacmchristmas.image | |
async def main(): | |
url = "wss://blinktest.acmcsuf.com/ws/018c2d43-a744-7a12-a847-990b6a7a3068" | |
tree = libacmchristmas.tree.TreeController(url) | |
await tree.connect() | |
print(f"Canvas is {tree.ix}x{tree.iy}") | |
imagePath = "static/rainbow.jpg" | |
await tree.draw_from_file(imagePath) # can also use tree.draw() | |
print(f"Drew {imagePath}!") | |
if __name__ == "__main__": | |
loop = asyncio.new_event_loop() | |
asyncio.set_event_loop(loop) | |
loop.run_until_complete(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment