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

No module named schema for sqlalchemy #374

Closed
glenwinters opened this Issue Dec 12, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@glenwinters

glenwinters commented Dec 12, 2014

I'm trying to get my script to work for the first time, and I'm getting this error:

Traceback (most recent call last):
  File "port_api.py", line 3, in <module>
    import flask.ext.restless
  File "/usr/lib/python2.7/dist-packages/flask/exthook.py", line 81, in load_module
    reraise(exc_type, exc_value, tb.tb_next)
  File "/usr/local/lib/python2.7/dist-packages/flask_restless/__init__.py", line 22, in <module>
    from .manager import APIManager
  File "/usr/local/lib/python2.7/dist-packages/flask_restless/manager.py", line 18, in <module>
    from .views import API
  File "/usr/local/lib/python2.7/dist-packages/flask_restless/views.py", line 44, in <module>
    from sqlalchemy.sql.schema import Column
ImportError: No module named schema

I poked around and found that Column exists in sqlalchemy.schema. I checked that the versions of my libraries are the correct version.

@oko

This comment has been minimized.

Contributor

oko commented Jan 2, 2015

sqlalchemy.sql.schema doesn't exist in SQLAlchemy v0.8, only in v0.9. However, requirements.txt still specifies sqlalchemy>=0.8 so anyone with v0.8 already installed won't be upgraded and things will break.

oko added a commit to oko/flask-restless that referenced this issue Jan 2, 2015

Fix jfinkels#374
SQLAlchemy v0.9 required to use `sqlalchemy.sql.schema`

@oko oko referenced this issue Jan 2, 2015

Merged

Fix #374 #377

@jfinkels

This comment has been minimized.

Owner

jfinkels commented Jan 2, 2015

This will be fixed when pull request #377 gets merged. For now, try simply modifying the line from sqlalchemy.sql.schema import Column to from sqlalchemy import Column.

@jfinkels jfinkels closed this in #377 Jan 2, 2015

jfinkels added a commit that referenced this issue Jan 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment