I installed alembic tool in 3 of my computers. 2 of them finally worked
fine, but this one doesn't work with the same configuration.
I tried both of below code in env.py:
1) import os, sys
sys.path.append(os.getcwd())
from dbmodule import SAINT8
target_metadata = SAINT8.Base.metadata
2) I updated pythonpath for this one:
from dbmodule import SAINT8
target_metadata = SAINT8.Base.metadata
But I always got error , and really have no idea :(
Traceback (most recent call last):
File "/usr/local/bin/alembic", line 9, in <module>
load_entry_point('alembic==0.4.0', 'console_scripts', 'alembic')()
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line
255, in main
CommandLine(prog=prog).main(argv=argv)
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line
250, in main
self.run_cmd(cfg, options)
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line
241, in run_cmd
**dict((k, getattr(options, k)) for k in kwarg)
File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line
97, in revision
script.run_env()
File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line
191, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/local/lib/python2.7/dist-packages/alembic/util.py", line 185,
in lo ad_python_file
module = imp.load_source(module_id, path, open(path, 'rb'))
File "alembic/env.py", line 18, in <module>
from dbmodule import SAINT8
ImportError: No module named dbmodule
Thanks and best regards.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sqlalchemy/-/q4nnx5iq7uoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.