部署app后运行错误2019
Operation error 2019 after deploying app
我已经成功部署了我的应用程序,但是在打开应用程序后出现此错误后我完全卡住了。我一直在调查,我一直认为我安装了错误版本的 mysqldb?
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
rv = self.handle_exception(request, response, e)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
rv = self.router.dispatch(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
return handler.dispatch()
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/e~coherent-galaxy-xxxxx/1.383270042073427138/servicecatalog.py", line 23, in get
db = MySQLdb.connect(unix_socket='/cloudsql/' + _INSTANCE_NAME, host='xxxxxx', port=3306, db='xxxxxx', user='root', charset='utf 8')
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/MySQLdb-1.2.4b4/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/MySQLdb-1.2.4b4/MySQLdb/connections.py", line 218, in __init__
self.set_character_set(charset)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/MySQLdb-1.2.4b4/MySQLdb/connections.py", line 301, in set_character_set
super(Connection, self).set_character_set(charset)
OperationalError: (2019, "Can't initialize character set utf 8 (path: /usr/local/mysql/share/charsets/)")
感谢您的帮助!
您的 MySQLdb.connect 行代码中可能包含 charset='utf 8'。删除它,你应该没问题。
我已经成功部署了我的应用程序,但是在打开应用程序后出现此错误后我完全卡住了。我一直在调查,我一直认为我安装了错误版本的 mysqldb?
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
rv = self.handle_exception(request, response, e)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
rv = self.router.dispatch(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
return handler.dispatch()
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/e~coherent-galaxy-xxxxx/1.383270042073427138/servicecatalog.py", line 23, in get
db = MySQLdb.connect(unix_socket='/cloudsql/' + _INSTANCE_NAME, host='xxxxxx', port=3306, db='xxxxxx', user='root', charset='utf 8')
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/MySQLdb-1.2.4b4/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/MySQLdb-1.2.4b4/MySQLdb/connections.py", line 218, in __init__
self.set_character_set(charset)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/MySQLdb-1.2.4b4/MySQLdb/connections.py", line 301, in set_character_set
super(Connection, self).set_character_set(charset)
OperationalError: (2019, "Can't initialize character set utf 8 (path: /usr/local/mysql/share/charsets/)")
感谢您的帮助!
您的 MySQLdb.connect 行代码中可能包含 charset='utf 8'。删除它,你应该没问题。