Reputation: 43
I've tried various versions of flask-marshmallow, and have installed and uninstalled the latest version as well. As you can see below, I've also verified that I'm using the latest version which should have SQLAlchemyAutoSchema
but I'm not able to access it.
>>> 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'
I'm out of ideas on what could be causing this. Anyone seen this before?
Upvotes: 2
Views: 2084
Reputation: 1330
This does not apply to you, but I have got the same error while tinkering on a test project with barebone SQLAlchemy instead of Flask-SQLAlchemy.
Installing Flask-SQLAlchemy solved the error.
Upvotes: 1