Issue #355: Migration error in 0.5.1 (conservancy/kallithea)

toras9000 issues-reply at bitbucket.org
Sat Feb 1 19:20:17 UTC 2020


New issue 355: Migration error in 0.5.1
https://bitbucket.org/conservancy/kallithea/issues/355/migration-error-in-051

toras 9000:

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](http://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


More information about the kallithea-general mailing list