Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot import name Serializer #4

Open
ameygat opened this issue Nov 8, 2017 · 1 comment
Open

Error: Cannot import name Serializer #4

ameygat opened this issue Nov 8, 2017 · 1 comment

Comments

@ameygat
Copy link

ameygat commented Nov 8, 2017

python run.py -i code dies with error Cannot import Serializer.
Is it issue with Marmallow version ?

(env) a@a-virtual-machine ~/api/flask-restapi-recipe $ pip install Serializer
Collecting Serializer
  Downloading Serializer-0.2.1.tar.gz
Requirement already satisfied: setuptools in /home/a/api/env/lib/python2.7/site-packages (from Serializer)
Collecting simplejson (from Serializer)
  Downloading simplejson-3.12.0-py2-none-any.whl (51kB)
    100% |████████████████████████████████| 61kB 270kB/s 
Building wheels for collected packages: Serializer
  Running setup.py bdist_wheel for Serializer ... done
  Stored in directory: /home/a/.cache/pip/wheels/a5/d1/e4/71d7902ec002fc5bad63f5f70a44a1c1b1b321b880fc27f407
Successfully built Serializer
Installing collected packages: simplejson, Serializer
Successfully installed Serializer-0.2.1 simplejson-3.12.0
(env) a@a-virtual-machine ~/api/flask-restapi-recipe $ python run.py -i
/home/a/api/flask-restapi-recipe/restapi/__init__.py:7: ExtDeprecationWarning: Importing flask.ext.sqlalchemy is deprecated, use flask_sqlalchemy instead.
  from flask.ext.sqlalchemy import SQLAlchemy
/home/a/api/env/local/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py:794: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
  'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
Traceback (most recent call last):
  File "run.py", line 32, in <module>
    from restapi import app, db
  File "/home/a/api/flask-restapi-recipe/restapi/__init__.py", line 40, in <module>
    from modules.cakes import mod as cakes_module
  File "/home/a/api/flask-restapi-recipe/restapi/modules/cakes/__init__.py", line 3, in <module>
    from controllers import mod
  File "/home/a/api/flask-restapi-recipe/restapi/modules/cakes/controllers.py", line 8, in <module>
    from restapi.modules.cakes.models import Cake, db, CakeSerializer
  File "/home/a/api/flask-restapi-recipe/restapi/modules/cakes/models.py", line 4, in <module>
    from marshmallow import Serializer, fields
ImportError: cannot import name Serializer

@sanfx
Copy link

sanfx commented Feb 19, 2018

after you source in the env , in python terminal import marshmallow and then check marshmallow.file or just marshmallow, check if this is giving the path of the version you re expecting ! apart from that this is not related to the flask-restapi-recipie .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants