Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5446 closed defect (cant-reproduce)

gmd dbupdate: AttributeError: 'Config' object has no attribute 'attributes'

Reported by: mrb Owned by:
Priority: major Milestone:
Component: programming Keywords:
Cc: Parent Tickets:


Git rev: 3f08f780f6698622dba0e8de74ece9194fdb7726

Running gmg dbupdate yields:

sh-4.3$ ./bin/gmg dbupdate
/usr/local/mediagoblin/mediagoblin/mediagoblin/media_types/video/ PyGIWarning: GstPbutils was imported without specifying a version first. Use gi.require_version('GstPbutils', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GstPbutils
/usr/local/mediagoblin/mediagoblin/local/lib/python2.7/site-packages/SQLAlchemy-0.8.6-py2.7-linux-i686.egg/sqlalchemy/engine/ SAWarning: Unicode type received non-unicode bind param value.
Traceback (most recent call last):
  File "./bin/gmg", line 9, in <module>
    load_entry_point('mediagoblin==0.8.0', 'console_scripts', 'gmg')()
  File "/usr/local/mediagoblin/mediagoblin/mediagoblin/gmg_commands/", line 148, in main_cli
  File "/usr/local/mediagoblin/mediagoblin/mediagoblin/gmg_commands/", line 162, in dbupdate
    run_dbupdate(app_config, global_config)
  File "/usr/local/mediagoblin/mediagoblin/mediagoblin/gmg_commands/", line 134, in run_dbupdate
    run_alembic_migrations(db, app_config, global_config)
  File "/usr/local/mediagoblin/mediagoblin/mediagoblin/gmg_commands/", line 115, in run_alembic_migrations
    manager = AlembicMigrationManager(Session())
  File "/usr/local/mediagoblin/mediagoblin/mediagoblin/db/", line 49, in __init__
    self.alembic_cfg.attributes["session"] = self.session
AttributeError: 'Config' object has no attribute 'attributes'

Change History (3)

comment:1 by mrb, 8 years ago

Git bisect blames revision: af6b89eafe4bce418737c66ad8ebef5aa297f378

Last edited 8 years ago by mrb (previous) (diff)

comment:2 by Boris Bobrov, 8 years ago

Resolution: worksforme
Status: newclosed

After chat in IRC, this looks like environment issue.

comment:3 by Alex Jordan, 8 years ago

Just ran into this issue. In case anyone else does, make sure your Alembic version is the latest.


./bin/python -c 'import alembic; print(alembic.__version__)'

to check your Alembic version. If it's 0.6.6, there's your problem. It should be 0.8.5 or greater. Check to make sure that git status shows a clean working directory, and see if pip freeze | grep alembic agrees with the version you got from invoking Python.

Note: See TracTickets for help on using tickets.