[Buildbot-devel] exceptions.AttributeError: 'str' object has no attribute 'has_key'

Stephen Davis stephendavis at mac.com
Tue Jul 11 04:30:28 UTC 2006


I think you have some unnecessary quoting here:

 >>>
b1 = {'name': 'builder1', 'slavename': 'changed3',  
'builddir':'builder1', 'factory': f1}
c['builders'] = ['b1']
 >>>

I think it should be:
c['builders'] = [b1]

hth,
stephen

On Jul 10, 2006, at 5:03 PM, brett wrote:

> 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
>
>
> ---------------------------------------------------------------------- 
> ---
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3607 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20060710/258d4365/attachment.bin>


More information about the devel mailing list