Migration error in 0.5.1

Issue #355 resolved
toras 9000 created an issue

When migrating by alembic in an environment where kallithea == 0.5.1 is installed by pip, an error occurs.
I think the cause itself is simple and lack of 'import os'.

Will this be fixed in the version installed by pip?

The traceback is included just in case.

Traceback (most recent call last):
File "/usr/local/bin/alembic", line 11, in <module>
load_entry_point('alembic==1.0.11', 'console_scripts', 'alembic')()
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 540, in main
CommandLine(prog=prog).main(argv=argv)
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 534, in main
self.run_cmd(cfg, options)
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 514, in run_cmd
**dict((k, getattr(options, k, None)) for k in kwarg)
File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 276, in upgrade
script.run_env()
File "/usr/local/lib/python2.7/dist-packages/alembic/script/base.py", line 475, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 90, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/lib/python2.7/dist-packages/alembic/util/compat.py", line 237, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/usr/local/lib/python2.7/dist-packages/kallithea/alembic/env.py", line 47, in <module>
{'file': config.config_file_name, 'here': os.path.dirname(config.config_file_name)},
NameError: name 'os' is not defined

Comments (1)

  1. Thomas De Schampheleire

    Thanks for reporting.

    The issue was already reported via IRC and fixed on the stable branch via c4e27c23079f .

    We will soon release a 0.5.2 with these changes. Meanwhile you could add the 'import os' in your local copy to proceed. Sorry for the inconvenience...

  2. Log in to comment