database connection - ImportError: No localization support for language 'eng' in python -
i getting importerror: no localization support language 'eng'
when using mysql connector python. traceback below.
traceback (most recent call last): file \"db_module.py\", line 151, in querydatabase file \"\\share\app\modules\mysql\connector\__init__.py\", line 44, in connect file \"\\share\app\modules\mysql\connector\connection.py\", line 106, in __init__ file \"\\share\app\modules\mysql\connector\connection.py\", line 325, in connect file \"\\share\app\modules\mysql\connector\connection.py\", line 288, in _open_connection file \"\\share\app\modules\mysql\connector\network.py\", line 326, in open_connection file \"\\sfs\show_time\showtime_package\showtime\modules\mysql\connector\errors.py\", line 160, in __init__ file \"\\share\app\modules\mysql\connector\locales\__init__.py\", line 52, in get_client_error importerror: no localization support language 'eng'
and current used sql
select * systemdetails system_id = 'system1' limit 1
can tell me how fix error.
in order mysql connector print actual error string - needs eng/client_error file in "locales" dir.
i personally, manually created dir "eng" , copy-paste file link: http://pydoc.net/python/mysql-connector-python/1.0.7/mysql.connector.locales.eng.client_error/
> mkdir eng > touch eng/__init__.py > vi eng/client_error.py > ... copy-paste, save, , exit.
i run code again, , received:
2013: lost connection mysql server during query
you'll different error, hope helps.
Be a man and include your sources. This answer was posted year before this blog was written and yet no reference.
ReplyDeletehttps://stackoverflow.com/questions/15893085/importerror-no-localization-support-for-language-eng-in-python