-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Description
With a fresh clone of this project from cookiecutter, alembic does not run:
$ alembic upgrade head
Traceback (most recent call last):
File "/Users/austin/.virtualenvs/ccfast/bin/alembic", line 8, in <module>
sys.exit(main())
File "/Users/austin/.virtualenvs/ccfast/lib/python3.9/site-packages/alembic/config.py", line 581, in main
CommandLine(prog=prog).main(argv=argv)
File "/Users/austin/.virtualenvs/ccfast/lib/python3.9/site-packages/alembic/config.py", line 575, in main
self.run_cmd(cfg, options)
File "/Users/austin/.virtualenvs/ccfast/lib/python3.9/site-packages/alembic/config.py", line 552, in run_cmd
fn(
File "/Users/austin/.virtualenvs/ccfast/lib/python3.9/site-packages/alembic/command.py", line 298, in upgrade
script.run_env()
File "/Users/austin/.virtualenvs/ccfast/lib/python3.9/site-packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "/Users/austin/.virtualenvs/ccfast/lib/python3.9/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "/Users/austin/.virtualenvs/ccfast/lib/python3.9/site-packages/alembic/util/compat.py", line 184, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "alembic/env.py", line 23, in <module>
from app.db.base import Base # noqa
ModuleNotFoundError: No module named 'app'
Looking at the way the source code is organized, I'm not sure it can work unless PYTHONPATH is modified or the alembic folder is moved. Can anyone shed some light on this?
Metadata
Metadata
Assignees
Labels
No labels