The example code in the README for local access includes these two lines
message = vesta.encode("{67} Hello, World {68}")
assert local_client.write_message(message)
However, data produced by vesta.encode apparently does not meet the format required by local_client.write_message and produces this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/lib/python3.9/site-packages/vesta/clients.py", line 222, in write_message
validate_rows(message)
File "/opt/homebrew/lib/python3.9/site-packages/vesta/chars.py", line 52, in validate_rows
raise ValueError(f"expected a ({ROWS}, {COLS}) array of encoded characters")
ValueError: expected a (6, 22) array of encoded characters
Thanks for spotting that, @garthwebb! Those examples should have used vesta.encode_text() to render the full character array. I've updated the README.md accordingly.
The example code in the README for local access includes these two lines
However, data produced by
vesta.encode
apparently does not meet the format required bylocal_client.write_message
and produces this error: