Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#5826 closed defect (fixed)

"TypeError: iterable argument required" when PrivateTickets and TracHours both enabled

Reported by: Charlie Armor Owned by: rjollos
Priority: high Component: TracHoursPlugin
Severity: major Keywords: "TypeError: iterable argument required" PrivateTickets TracHours
Cc: Trac Release: 0.11


When I enable both plugins:


The following error will be returned if I try to save changes to a ticket or create a new one, note the user making the change has Trac_Admin permissions:

Trac detected an internal error:

TypeError: iterable argument required

Python Traceback
Most recent call last:

File "/usr/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/web/", line 435, in _dispatch_request
File "/usr/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/web/", line 205, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/ticket/", line 182, in process_request
  return self._process_ticket_request(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/ticket/", line 504, in _process_ticket_request
  valid = self._validate_ticket(req, ticket) and not problems
File "/usr/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/ticket/", line 970, in _validate_ticket
  for field, message in manipulator.validate_ticket(req, ticket):
File "/usr/lib/python2.4/site-packages/TracHoursPlugin-0.3.1-py2.4.egg/trachours/", line 234, in validate_ticket
  can_add_hours = PermissionSystem(self.env).check_permission('TICKET_ADD_HOURS', user)
File "/usr/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/", line 425, in check_permission
File "/usr/lib/python2.4/site-packages/TracPrivateTickets-2.0.2-py2.4.egg/privatetickets/", line 32, in check_permission
  if username == 'anonymous' or \

System Information:

User Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv: Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14
Trac: 	0.11.4
Python: 	2.4.4 (#1, Apr 15 2008, 23:37:53) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]
setuptools: 	0.6c9
SQLite: 	3.3.8
pysqlite: 	2.3.2
Genshi: 	0.6dev-r1064
mod_python: 	3.2.10
Subversion: 	1.4.2 (r22196)
jQuery:	1.2.6

Both plugins work ok if the other is not enabled, but conflict with the error given above if I try to use them together.

The error message mentioned TracPrivateTickets so I have raised the bug there but the PrivateTickets plugin seems to quite static so hope you don't mind if I ask for help here as well.

Attachments (0)

Change History (5)

comment:1 Changed 4 years ago by rjollos

#6290 may be a duplicate.

comment:2 Changed 4 years ago by rjollos

See also #5825 for the PrivateTicketsPlugin.

comment:3 Changed 4 years ago by rjollos

  • Owner changed from k0s to rjollos
  • Status changed from new to assigned

See #5826 for additional comments on the fix I'm about the check-in.

comment:4 Changed 4 years ago by rjollos

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

(In [9569]) Verify permission with req.perm.has_permission since it correctly passes the PermissionCache object to check_permission. This fixes an error that occurred when using the PrivateTicketsPlugin because the check_permission method in that plugin doesn't check that the expected PermissionCache object might be a NoneType. Fixes #5825, #5826.

comment:5 Changed 4 years ago by rjollos

(In [9570]) Fix permission checks elsewhere in code, as in [9569]. Refs #5825, #5826.

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.