File "./watermark/models.py", line 103, in <module>
class WaterMark(db.Model):
File "./watermark/models.py", line 107, in WaterMark
INTEGER(unsigned=True),
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/testing/schema.py", line 76, in Column
if not config.requirements.foreign_key_ddl.enabled_for_config(config):
AttributeError: 'NoneType' object has no attribute 'foreign_key_ddl'
# 原始代码
from sqlalchemy.testing.schema import Column
id = Column(
INTEGER(unsigned=True),
primary_key=True
)
solve
from sqlalchemy import Column
id = Column(
INTEGER(unsigned=True),
primary_key=True
)
- 使用编辑器自动导包需要注意不要导错了
来源:CSDN
作者:vivian_wanjin
链接:https://blog.csdn.net/vivian_wanjin/article/details/103462007