marshmallow-sqlalchemy-giving-syntax-error
avanishtiwari38 opened this issue ยท 6 comments
After installing marshmallow-sqlalchemy
in python 3.5 it is showing me syntax error.
Traceback (most recent call last):
File "run.py", line 1, in <module>
from app import flask_app
File "/var/www/html/mswipe-banner/mswipe-banner/app/__init__.py", line 10, in <module>
from .models import *
File "/var/www/html/mswipe-banner/mswipe-banner/app/models/__init__.py", line 1, in <module>
from .banner import *
File "/var/www/html/mswipe-banner/mswipe-banner/app/models/banner.py", line 1, in <module>
from .base_model import *
File "/var/www/html/mswipe-banner/mswipe-banner/app/models/base_model.py", line 1, in <module>
from flask_marshmallow import Marshmallow
File "/var/www/html/mswipe-banner/lib/python3.5/site-packages/flask_marshmallow/__init__.py", line 24, in <module>
from . import sqla
File "/var/www/html/mswipe-banner/lib/python3.5/site-packages/flask_marshmallow/sqla.py", line 13, in <module>
import marshmallow_sqlalchemy as msqla
File "/var/www/html/mswipe-banner/lib/python3.5/site-packages/marshmallow_sqlalchemy/__init__.py", line 1, in <module>
from .schema import TableSchemaOpts, ModelSchemaOpts, TableSchema, ModelSchema
File "/var/www/html/mswipe-banner/lib/python3.5/site-packages/marshmallow_sqlalchemy/schema.py", line 3, in <module>
from .convert import ModelConverter
File "/var/www/html/mswipe-banner/lib/python3.5/site-packages/marshmallow_sqlalchemy/convert.py", line 80
):
^
SyntaxError: invalid syntax
Is there any problem with marshmallow
.
Stack overflow
Thank you
How did you fix this problem? I encounter it now.
You will have to upgrade your python to 3.6 or if you are using python 3.5 than use marshmallow version 18.0
For explaining please follow my stack overflow link below.
https://stackoverflow.com/questions/58818863/marshmallow-sqlalchemy-giving-syntax-error
@avanishtiwari38 Thanks a lot! The error looks pretty crazy...
You will have to upgrade your python to 3.6 or if you are using python 3.5 than use marshmallow version 18.0
For explaining please follow my stack overflow link below.
https://stackoverflow.com/questions/58818863/marshmallow-sqlalchemy-giving-syntax-error
Hi, I am on Debian (stretch) 64-bit and Python 3.5, how do I install marshmallow-sqlalchemy version 18.0?
Thank you.
pip3 install -U marshmallow-sqlalchemy
More like
pip install marshmallow-sqlalchemy==18.0
if you're using pip.