2

我目前正在尝试了解 buildbot 并正在阅读教程的第一部分。但我被困在我应该创建主人的部分。我尝试通过使用网站来修复错误,但仍然给我错误。

Traceback (most recent call last):
File "./bin/buildbot", line 5, in <module>
pkg_resources.run_script('buildbot==0.8.7p1', 'buildbot')
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 489, in run_script
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1207, in run_script
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/buildbot-0.8.7p1-py2.7.egg/EGG-INFO/scripts/buildbot", line 4, in <module>
runner.run()
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/buildbot-0.8.7p1-py2.7.egg/buildbot/scripts/runner.py", line 696, in run
subcommandFunction = reflect.namedObject(subconfig.subcommandFunction)
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/Twisted-13.0.0-py2.7- linux-x86_64.egg/twisted/python/_reflectpy3.py", line 151, in namedObject
module = namedModule('.'.join(classSplit[:-1]))
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/python/_reflectpy3.py", line 137, in namedModule
topLevel = __import__(name)
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/buildbot-0.8.7p1-py2.7.egg/buildbot/scripts/create_master.py", line 23, in <module>
from buildbot.db import connector
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/buildbot-0.8.7p1-py2.7.egg/buildbot/db/connector.py", line 22, in <module>
from buildbot.db import pool, model, changes, schedulers, sourcestamps, sourcestampsets
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/buildbot-0.8.7p1-py2.7.egg/buildbot/db/model.py", line 18, in <module>
import migrate.versioning.schema
File "/home/hari/tmp/buildbot/sandbox/lib/python2.7/site-packages/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/schema.py", line 10, in <module>
from sqlalchemy import exceptions as sa_exceptions
ImportError: cannot import name exceptions
4

2 回答 2

11

发生此错误是因为0.8+ 和0.7.2之间不兼容SQLAlchemysqlalchemy-migrate。您可以通过安装早期版本来解决它:

$ pip uninstall sqlalchemy
$ pip install 'sqlalchemy <= 0.7.10'
于 2013-07-09T21:28:36.760 回答
3

 sandbox/lib/python2.7/site-packages/sqlalchemy_migrate-0.*/migrate/versioning/schema.py at line 10

异常更改为exc,使其看起来像

 from sqlalchemy import exc as sa_exceptions 
于 2013-06-20T02:58:44.647 回答