从烧瓶棉花糖访问`SQLAlchemyAutoSchema`时遇到问题,尽管我安装了最新版本的烧瓶棉花糖

时间:2020-05-26 21:26:58

标签: python flask flask-sqlalchemy marshmallow

我尝试了各种版本的长颈瓶棉花糖,并且还安装和卸载了最新版本。如您在下面看到的,我还验证了我正在使用应该具有SQLAlchemyAutoSchema的最新版本,但是我无法访问它。

>>> import flask_marshmallow
>>> dir(flask_marshmallow)
['EXTENSION_NAME', 'LooseVersion', 'Marshmallow', 'Schema', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '__version_info__', '__warningregistry__', '_attach_fields', 'base_fields', 'compat', 'exceptions', 'fields', 'flask_sqlalchemy', 'has_sqla', 'pprint', 'schema', 'warnings']
>>> flask_marshmallow.__version__
'0.12.0'
>>> flask_marshmallow.Marshmallow()
<flask_marshmallow.Marshmallow object at 0x10300de48>
>>> flask_marshmallow.Marshmallow().SQLAlchemyAutoSchema
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Marshmallow' object has no attribute 'SQLAlchemyAutoSchema'

我对可能导致这种情况的想法一无所知。有人看过吗?

0 个答案:

没有答案