Opened 14 years ago

Last modified 13 years ago

#6336 closed defect

AttributeError: 'list' object has no attribute 'items' — at Version 3

Reported by: C. M. Owned by: John Hampton
Priority: high Component: TaskListPlugin
Severity: major Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

This could very well be of my own fault - but I may need a little help figuring it out.

Since upgrading Trac to 0.12, I haven't been able to use TaskList and I miss it. This error is displayed when trying to access /tasklist

File "/usr/local/lib/python2.5/site-packages/Trac-0.12dev_r8641-py2.5.egg/trac/web/main.py", line 467, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/local/lib/python2.5/site-packages/Trac-0.12dev_r8641-py2.5.egg/trac/web/main.py", line 212, in dispatch
  resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/tasklist/main.py", line 99, in process_request
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Trac: 	0.12dev-r8641
Python: 	2.5.1 (r251:54863, Jan 11 2008, 10:58:38) [GCC 3.4.3 20041212 (Red Hat 3.4.3-10)]
setuptools: 	0.6c7
MySQL: 	server: "5.0.45-community", client: "5.0.45", thread-safe: 0
MySQLdb: 	1.2.2
Genshi: 	0.6dev-r1052
Babel: 	-
mod_python: 	3.3.1
Pygments: 	0.9
Subversion: 	1.4.6 (r28521)
jQuery:	1.3.2

Change History (3)

comment:1 Changed 14 years ago by Christian Boos

See also googlegroups:trac-users:7488291261db4071 for some explanations about the error.

comment:2 Changed 13 years ago by anonymous

In main.py change lines 99-102 from

            for field, vals in constraints.items():
                for val in vals:
                    if val.endswith('$USER'):
                        del constraints[field]

to

            for field, vals in constraints[0].items():
                for val in vals:
                    if val.endswith('$USER'):
                        del constraints[0][field]

comment:3 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.