question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

marshmallow-sqlalchemy-giving-syntax-error

See original GitHub issue

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 😊

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
avanishtiwari38commented, Dec 13, 2019

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

0reactions
lafrechcommented, Jul 6, 2021

More like

pip install marshmallow-sqlalchemy==18.0

if you’re using pip.

Read more comments on GitHub >

github_iconTop Results From Across the Web

marshmallow-sqlalchemy giving syntax error - Stack Overflow
The installation fails because marshmallow-sqlalchemy no longer supports Python 3.5. The last version to support Python 3.5 is version 18.0, ...
Read more >
Source code for marshmallow_sqlalchemy.exceptions
class MarshmallowSQLAlchemyError(Exception): """Base exception class from which all exceptions related to marshmallow-sqlalchemy inherit. """.
Read more >
SQLAlchemy: inspection of column type size gives odd result
Is it possible to query a column for its maximum possible size of data (in bytes) that can be stored in it? For...
Read more >
Developing Python Web Applications with Flask
SQLAlchemy is great for working with relational databases. It is the Python SQL toolkit and Object Relational Mapper (ORM) that gives you the...
Read more >
marshmallow-code - Bountysource
Created 6 years ago in marshmallow-code/marshmallow-sqlalchemy with 13 comments. ... This might be as simple as providing the use_schema decorator, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found