Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3107 closed defect (fixed)

Build slave page fails with “TypeError: 'NoneType' object has no attribute '__getitem__'”

Reported by: ims Owned by: dustin
Priority: critical Milestone: 0.9.0
Version: 0.8.10 Keywords:


Since version 0.8.10 the links to individual build slaves from /buildslaves to /buildslaves/{$name} no longer work. An exception is raised:

…/buildbot/status/web/ in content
116        try:
117            max_builds = int(request.args.get('numbuilds')[0])
118        except ValueError:
exceptions.TypeError: 'NoneType' object has no attribute '__getitem__' 

The catch clause should be except (ValueError, TypeError):. The offending commit is 388e868cc482e. It changed other places too which likely need similar fixes.

A work-around is to add ?numbuilds=10 to the URL.

Change History (5)

comment:1 Changed 4 years ago by dustin

  • Owner set to dustin
  • Status changed from new to assigned

comment:2 Changed 4 years ago by dustin

  • Milestone changed from undecided to 0.9.0

It looks like that's the only case where get was called without a default.

comment:3 Changed 4 years ago by Ben

This is GH:1441

Last edited 4 years ago by Ben (previous) (diff)

comment:4 Changed 4 years ago by Dustin J. Mitchell <dustin@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 72f79a87660cbdc5af0993f35dae590594428823:

Add a default for request.args.get

And, just for the heck of it, catch TypeError? anyway. Fixes #3107.

comment:5 Changed 4 years ago by Mikhail Sobolev <mss@…>

In c784c59d2d32124726f86f9c3f117b59084a8ae9:

Merge pull request #1441 from djmitche/bug3107

Add a default for request.args.get

Note: See TracTickets for help on using tickets.