pwwang / pymedoo

A lightweight database framework for python
MIT License
15 stars 4 forks source link

No localization support error #10

Closed shkumbinhasani closed 3 years ago

shkumbinhasani commented 3 years ago

At the end of every script i get the No localization support support error, everything is working fine it just shows it

Exception ignored in: <function Base.__del__ at 0x0370C388>
Traceback (most recent call last):
  File "C:\Users\x\pythonProjects\x\venv\lib\site-packages\medoo\base.py", line 55, in __del__
  File "C:\Users\x\pythonProjects\x\venv\lib\site-packages\medoo\base.py", line 45, in close
  File "C:\Users\x\pythonProjects\x\venv\lib\site-packages\mysql\connector\connection.py", line 383, in close
  File "C:\Users\x\pythonProjects\x\venv\lib\site-packages\mysql\connector\connection.py", line 768, in cmd_quit
  File "C:\Users\x\pythonProjects\x\venv\lib\site-packages\mysql\connector\network.py", line 166, in send_plain
  File "C:\Users\x\pythonProjects\x\venv\lib\site-packages\mysql\connector\errors.py", line 187, in __init__
  File "C:\Users\x\pythonProjects\x\venv\lib\site-packages\mysql\connector\locales\__init__.py", line 58, in get_client_error
ImportError: No localization support for language 'eng'
pwwang commented 3 years ago

See: https://forums.mysql.com/read.php?50,619731,619731#msg-619731 and https://stackoverflow.com/questions/58077532/import-error-no-localization-support-for-language-eng

Does it make a difference if you import this on the top of your script:

from mysql.connector.locales.eng import client_error
# or 
import mysql.connector.locales.eng.client_error
shkumbinhasani commented 3 years ago

No it doesnt but it seems like its not a big deal since its only happening while running on venv on my IDE and not on the actual interpreter so thats no problem and sorry for putting this issue here

pwwang commented 3 years ago

No problem at all. Running on REPL is probably one of the reasons as one of the answers the that stackoverflow question showed.