'NoneType' object has no attribute 'foreign_key_ddl'
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