dvrhax / uPyMySQL

Pure uPython MySQL Client
MIT License
24 stars 5 forks source link

charset.py KeyError: 255 #5

Closed BryanSouza91 closed 2 months ago

BryanSouza91 commented 2 months ago

I will continue to look into this error on my own, no expectations from @dvrhax I open this issue as a place to document the error I am experiencing.

charsets are defined in charset.py at line 59. I am still working on determining where the 255 key is coming from.

Traceback (most recent call last):
  File "main.py", line 24, in <module>
  File "upymysql/__init__.py", line 89, in Connect
  File "upymysql/connections.py", line 668, in __init__
  File "upymysql/connections.py", line 900, in connect
  File "upymysql/connections.py", line 1248, in _get_server_information
  File "upymysql/charset.py", line 38, in by_id
KeyError: 255
BryanSouza91 commented 2 months ago

Fixed this by simply adding _charsets.add(Charset(255, "utf8mb4", "utf8mb4_0900_ai_ci")) to the charset.py file.