(下边有更新,这个是临时方法)在weibospider项目新建所有的表时遇到的错误:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/pool.py", line 1122, in _do_get
return self._pool.get(wait, self._timeout)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/util/queue.py", line 145, in get
raise Empty
sqlalchemy.util.queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "create_all.py", line 10, in <module>

在尝试创建WeiboSpider项目的数据库表时遇到PyMySQL KeyError:255的错误。由于无法确定具体原因,采取了更换数据库引擎的临时解决方案。问题可能由MySQL8.0更新的字符集长度超过255导致,旧版PyMySQL不支持。可通过更新PyMySQL到最新版本来解决。
最低0.47元/天 解锁文章
2771





