Bug 908827 - [abrt] python-alembic-0.3.4-4.fc18: script.py:176:_downgrade_revs:AttributeError: 'NoneType' object has no attribute 'module'
Summary: [abrt] python-alembic-0.3.4-4.fc18: script.py:176:_downgrade_revs:AttributeEr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-alembic
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ralph Bean
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:fc155bc798848f301781ff78c2b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-07 15:47 UTC by Pierre-YvesChibon
Modified: 2013-06-11 13:35 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-06-11 13:35:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.69 KB, text/plain)
2013-02-07 15:47 UTC, Pierre-YvesChibon
no flags Details
File: core_backtrace (1.06 KB, text/plain)
2013-02-07 15:47 UTC, Pierre-YvesChibon
no flags Details
File: environ (2.70 KB, text/plain)
2013-02-07 15:47 UTC, Pierre-YvesChibon
no flags Details
File: smolt_data (2.81 KB, text/plain)
2013-02-07 15:47 UTC, Pierre-YvesChibon
no flags Details

Description Pierre-YvesChibon 2013-02-07 15:47:13 UTC
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

Comment 1 Pierre-YvesChibon 2013-02-07 15:47:38 UTC
Created attachment 694567 [details]
File: backtrace

Comment 2 Pierre-YvesChibon 2013-02-07 15:47:48 UTC
Created attachment 694568 [details]
File: core_backtrace

Comment 3 Pierre-YvesChibon 2013-02-07 15:47:51 UTC
Created attachment 694569 [details]
File: environ

Comment 4 Pierre-YvesChibon 2013-02-07 15:47:53 UTC
Created attachment 694570 [details]
File: smolt_data

Comment 5 Ralph Bean 2013-04-23 03:44:08 UTC
Verified.  I can duplicate this.

Comment 6 Ralph Bean 2013-05-22 03:02:08 UTC
The command you were trying to run is disallowed in python-alembic-0.4.2, but the output makes more sense.

Comment 7 Fedora Update System 2013-05-22 03:21:17 UTC
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

Comment 8 Fedora Update System 2013-06-11 09:14:45 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.