Description of problem: - Create an alembic project - Create a new revision - Upgrade to this new revision - Try to generate the sql to downgrade : $ alembic downgrade 3f04505c8221 --sql - crash :) Version-Release number of selected component: python-alembic-0.3.4-4.fc18 Additional info: cmdline: /usr/bin/python /usr/bin/alembic downgrade 3f04505c8221 --sql executable: /usr/bin/alembic kernel: 3.7.5-201.fc18.x86_64 uid: 1000 Truncated backtrace: script.py:176:_downgrade_revs:AttributeError: 'NoneType' object has no attribute 'module' Traceback (most recent call last): File "/usr/bin/alembic", line 9, in <module> load_entry_point('alembic==0.3.4', 'console_scripts', 'alembic')() File "/usr/lib/python2.7/site-packages/alembic/config.py", line 229, in main **dict((k, getattr(options, k)) for k in kwarg) File "/usr/lib/python2.7/site-packages/alembic/command.py", line 145, in downgrade script.run_env() File "/usr/lib/python2.7/site-packages/alembic/script.py", line 188, in run_env util.load_python_file(self.dir, 'env.py') File "/usr/lib/python2.7/site-packages/alembic/util.py", line 185, in load_python_file module = imp.load_source(module_id, path, open(path, 'rb')) File "alembic/env.py", line 68, in <module> run_migrations_offline() File "alembic/env.py", line 41, in run_migrations_offline context.run_migrations() File "<string>", line 7, in run_migrations File "/usr/lib/python2.7/site-packages/alembic/environment.py", line 450, in run_migrations self.get_context().run_migrations(**kw) File "/usr/lib/python2.7/site-packages/alembic/migration.py", line 200, in run_migrations self): File "/usr/lib/python2.7/site-packages/alembic/command.py", line 134, in downgrade return script._downgrade_revs(revision, rev) File "/usr/lib/python2.7/site-packages/alembic/script.py", line 176, in _downgrade_revs for script in revs AttributeError: 'NoneType' object has no attribute 'module' Local variables in innermost frame: revs: <generator object _iterate_revisions at 0x24882d0> destination: '3f04505c8221' self: <alembic.script.ScriptDirectory object at 0x23f1d50> current_rev: None script: None
Created attachment 694567 [details] File: backtrace
Created attachment 694568 [details] File: core_backtrace
Created attachment 694569 [details] File: environ
Created attachment 694570 [details] File: smolt_data
Verified. I can duplicate this.
The command you were trying to run is disallowed in python-alembic-0.4.2, but the output makes more sense.
python-alembic-0.4.2-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/python-alembic-0.4.2-1.fc18
python-alembic-0.4.2-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.