What steps will reproduce the problem? 1. Run the program. See transcript below.
What is the expected output? What do you see instead?
$ sqlautocode sqlite:///tutorial.db -o models.py Traceback (most recent call last): File "/usr/local/bin/sqlautocode", line 9, in <module> load_entry_point('sqlautocode==0.7', 'console_scripts', 'sqlautocode')() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 318, in load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2221, in load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1954, in load possible to create pathological version coding schemes that will fool File "/Library/Python/2.7/site-packages/sqlautocode/main.py", line 4, in <module> from declarative import ModelFactory File "/Library/Python/2.7/site-packages/sqlautocode/declarative.py", line 17, in <module> from sqlalchemy.ext.declarative import _deferred_relation as _deferred_relationship ImportError: cannot import name _deferred_relation
What version of the product are you using? On what operating system?
SQLAlchemy (0.8.0) sqlautocode (0.7) (both freshly updated from PyPI)
On Mac OS X 10.7.5, using Python 2.7.1
Please provide any additional information below.
Comment #1
Posted on Apr 17, 2013 by Massive DogThe attached patch should fix the error; or you can try yo use this clone: https://bitbucket.org/x746e/sqlautocode
- sa-0.8-fixes.diff 1.17KB
Comment #2
Posted on May 27, 2013 by Swift WombatGot the same error and can confirm that the patch fixes the issue.
Comment #3
Posted on Jul 4, 2013 by Grumpy BearSame issue here:
SQLAlchemy==0.8.0 sqlautocode==0.7
Comment #4
Posted on Jul 4, 2013 by Swift CamelComment deleted
Comment #5
Posted on Jul 4, 2013 by Swift CamelComment deleted
Comment #6
Posted on Jul 10, 2013 by Swift CamelI confirm that, for SQLAlchemy==0.8.0 and sqlautocode==0.6, the patch fixes the issue.
Comment #7
Posted on Jul 13, 2013 by Quick Hippocannot fix in Windows.
there is no sqlautocode python source files
Comment #8
Posted on Sep 18, 2013 by Grumpy OxAre you planning a new release that includes this fix? SQLA 0.8 has been out for half a year now.
It's quite awkward having to manually apply a patch on a pip installed package.
Comment #9
Posted on Oct 21, 2013 by Quick BirdI just installed this via PIP as well (Windows OS). It looks like the change (if committed) still hasn't been made a part of the latest release. I'm only an ammature, so getting this applied in my environment will require some digging. sqlalchemy->0.8.2 sqlautocode->0.7
Comment #10
Posted on Nov 18, 2013 by Massive HippoAgree with #9 ihiengd...@gmail.com ...
This is a little tough if you don't know how to change and easy install file. Any suggestions on how to do this ?
Comment #11
Posted on Jan 20, 2014 by Happy CamelThanks for patch, fixed it for me using Fedora20/sqla-0.8 and sqlautocode0.6
Comment #12
Posted on Mar 12, 2014 by Massive ElephantThanks for the patch!
Status: New
Labels:
Type-Defect
Priority-Medium