[Buildbot-devel] exceptions.AttributeError: 'str' object has no attribute 'has_key'
brett
bneely at gmail.com
Tue Jul 11 00:03:20 UTC 2006
Hi folks:
When I run "buildbot start ." on my buildmaster, I receive this error
in twistd.log:
2006/07/10 15:43 PDT [-] error during loadConfig
2006/07/10 15:43 PDT [-] Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/twisted/scripts/twistd.py",
line 182, in startApplication
app.startApplication(application, not config['no_save'])
File "/usr/lib/python2.3/site-packages/twisted/application/app.py",
line 298, in startApplication
service.IService(application).startService()
File "/usr/lib/python2.3/site-packages/twisted/application/service.py",
line 196, in startService
service.startService()
File "/usr/lib/python2.3/site-packages/buildbot/master.py",
line 630, in startService
self.loadTheConfigFile()
--- <exception caught here> ---
File "/usr/lib/python2.3/site-packages/buildbot/master.py",
line 685, in loadTheConfigFile
self.loadConfig(f)
File "/usr/lib/python2.3/site-packages/buildbot/master.py",
line 768, in loadConfig
if b.has_key('slavename') and b['slavename'] not in slavenames:
exceptions.AttributeError: 'str' object has no attribute 'has_key'
It looks like master.py is querying a builder dictionary 'b' for the
slavename. I'm not sure why the exception claims that builder is a
'str' object.
Does anyone see what the problem could be in my master.cfg?
My buildmaster configuration:
Mac OS X 10.4.7
Python 2.3.5
Twisted-2.4.0
buildbot-0.7.3
My obfuscated master.cfg:
strongbad:~/Desktop local$ cat master.cfg
# -*- python -*-
# ex: set syntax=python:
# documented in docs/config.xhtml .
import os.path
from buildbot import scheduler
from buildbot.scheduler import Scheduler
from buildbot.process import step, factory
from buildbot.status import html
from buildbot.changes.pb import PBChangeSource
s = factory.s
c = BuildmasterConfig = {}
c['sources'] = []
c['sources'].append(PBChangeSource())
c['bots'] = [('changed3', 'changedpw')]
source = s(step.SVN, mode='update',
baseURL='svn+ssh://bneely@changed/svn/myrepo/myproj/',
defaultBranch='trunk')
f1 = factory.BuildFactory([source,
s(step.Compile, command="build -option1 -option2"),
s(step.Test, command="build -option3 'Parameter'")])
b1 = {'name': 'builder1', 'slavename': 'changed3', 'builddir':
'builder1', 'factory': f1}
c['builders'] = ['b1']
c['schedulers'] = []
#trunk = Scheduler('trunkscheduler', None, 120, ['b1'])
#c['schedulers'] = ['trunk']
#c['schedulers'] = [Scheduler('trunkscheduler', None, 120, ['b1'])]
c['slavePortnum'] = 2222
c['status'] = []
c['status'].append( html.Waterfall( http_port=8080, css=os.path.join(
basedir, "buildbot.css" ) ) )
c['debugPassword'] = "changed"
c['projectName'] = "myproj"
c['projectURL'] = "http://myserver/"
c['buildbotURL'] = "http://myotherserver/"
-b
More information about the devel
mailing list