Opened 7 years ago

Closed 7 years ago

#2476 closed defect (fixed)

tutorial "buildbot create-master master" fails with ImportError

Reported by: kennethd Owned by:
Priority: major Milestone: 0.8.8
Version: 0.8.7p1 Keywords:
Cc:

Description

due to an incompatibility with sqlalchemy-migrate==0.7.2 and SQLAlchemy==0.8.0

(sandbox)kenneth@dhalgren:/tmp/bb$ buildbot create-master master
Traceback (most recent call last):
  File "/tmp/bb/sandbox/bin/buildbot", line 5, in <module>
    pkg_resources.run_script('buildbot==0.8.7p1', 'buildbot')
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 489, in run_script
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 1207, in run_script
  File "/tmp/bb/sandbox/lib/python2.6/site-packages/buildbot-0.8.7p1-py2.6.egg/EGG-INFO/scripts/buildbot", line 4, in <module>
    runner.run()
  File "/tmp/bb/sandbox/lib/python2.6/site-packages/buildbot-0.8.7p1-py2.6.egg/buildbot/scripts/runner.py", line 696, in run
    subcommandFunction = reflect.namedObject(subconfig.subcommandFunction)
  File "/tmp/bb/sandbox/lib/python2.6/site-packages/Twisted-12.3.0-py2.6-linux-i686.egg/twisted/python/_reflectpy3.py", line 95, in namedObject
    module = namedModule('.'.join(classSplit[:-1]))
  File "/tmp/bb/sandbox/lib/python2.6/site-packages/Twisted-12.3.0-py2.6-linux-i686.egg/twisted/python/_reflectpy3.py", line 82, in namedModule
    topLevel = __import__(name)
  File "/tmp/bb/sandbox/lib/python2.6/site-packages/buildbot-0.8.7p1-py2.6.egg/buildbot/scripts/create_master.py", line 23, in <module>
    from buildbot.db import connector
  File "/tmp/bb/sandbox/lib/python2.6/site-packages/buildbot-0.8.7p1-py2.6.egg/buildbot/db/connector.py", line 22, in <module>
    from buildbot.db import pool, model, changes, schedulers, sourcestamps, sourcestampsets
  File "/tmp/bb/sandbox/lib/python2.6/site-packages/buildbot-0.8.7p1-py2.6.egg/buildbot/db/model.py", line 18, in <module>
    import migrate.versioning.schema
  File "/tmp/bb/sandbox/lib/python2.6/site-packages/sqlalchemy_migrate-0.7.2-py2.6.egg/migrate/versioning/schema.py", line 10, in <module>
    from sqlalchemy import exceptions as sa_exceptions
ImportError: cannot import name exceptions

see https://code.google.com/p/sqlalchemy-migrate/issues/detail?id=156

i tried doing the following, but my edit didn't "take", it went ahead & tried to install 0.8.0 anyway:

(sandbox)kenneth@dhalgren:/tmp/bb2$ easy_install -b ./.build --dry-run buildbot
(sandbox)kenneth@dhalgren:/tmp/bb2$ cp .build/buildbot/setup.py  ./.build/buildbot/setup.py.ORIG
(sandbox)kenneth@dhalgren:/tmp/bb2$ vim  .build/buildbot/setup.py
(sandbox)kenneth@dhalgren:/tmp/bb2$ diff .build/buildbot/setup.py  ./.build/buildbot/setup.py.ORIG
192c192
<         'sqlalchemy >= 0.6, <= 0.7.10', # sqlalchemy-migrate not compatible with sqlalchemy 0.8.0
---
>         'sqlalchemy >= 0.6',
(sandbox)kenneth@dhalgren:/tmp/bb2$ easy_install -b ./.build buildbot

Change History (2)

comment:1 Changed 7 years ago by kennethd

workaround installing from source with same edit as above:

kenneth@dhalgren:/tmp$ mkdir bbtut && cd bbtut
kenneth@dhalgren:/tmp/bbtut$ virtualenv --no-site-packages sandbox 
kenneth@dhalgren:/tmp/bbtut$ source sandbox/bin/activate
(sandbox)kenneth@dhalgren:/tmp/bbtut$ mkdir src && cd src 
(sandbox)kenneth@dhalgren:/tmp/bbtut/src$ wget https://buildbot.googlecode.com/files/buildbot-0.8.7p1.tar.gz 
(sandbox)kenneth@dhalgren:/tmp/bbtut/src$ tar xzf buildbot-0.8.7p1.tar.gz 
(sandbox)kenneth@dhalgren:/tmp/bbtut/src$ cp buildbot-0.8.7p1/setup.py buildbot-0.8.7p1/setup.py.ORIG
(sandbox)kenneth@dhalgren:/tmp/bbtut/src$ vim buildbot-0.8.7p1/setup.py
(sandbox)kenneth@dhalgren:/tmp/bbtut/src$ diff buildbot-0.8.7p1/setup.py buildbot-0.8.7p1/setup.py.ORIG
192c192
<         'sqlalchemy >= 0.6, <= 0.7.10',
---
>         'sqlalchemy >= 0.6',
(sandbox)kenneth@dhalgren:/tmp/bbtut/src$ cd buildbot-0.8.7p1/
(sandbox)kenneth@dhalgren:/tmp/bbtut/src/buildbot-0.8.7p1$ ./setup.py install
(sandbox)kenneth@dhalgren:/tmp/bbtut/src/buildbot-0.8.7p1$ cd ../../
(sandbox)kenneth@dhalgren:/tmp/bbtut$ which buildbot
/tmp/bbtut/sandbox/bin/buildbot

comment:2 Changed 7 years ago by dustin

  • Milestone changed from undecided to 0.8.8
  • Resolution set to fixed
  • Status changed from new to closed
  • Type changed from undecided to defect

Yeah, that fix has already been merged in master. We're about to release 0.8.8 which will contain this fix.

Note: See TracTickets for help on using tickets.