Modify

Opened 15 years ago

Closed 13 years ago

Last modified 9 years ago

#5826 closed defect (fixed)

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

Reported by: Charlie Armor Owned by: Ryan J Ollos
Priority: high Component: TracHoursPlugin
Severity: major Keywords: PrivateTickets
Cc: Trac Release: 0.11

Description

When I enable both plugins:

TracHoursPlugin-0.3.1-py2.4 TracPrivateTickets-2.0.2-py2.4.egg

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:

Oops…
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/main.py", line 435, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/web/main.py", 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/web_ui.py", 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/web_ui.py", 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/web_ui.py", 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/hours.py", 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/perm.py", line 425, in check_permission
  perm)
File "/usr/lib/python2.4/site-packages/TracPrivateTickets-2.0.2-py2.4.egg/privatetickets/policy.py", line 32, in check_permission
  if username == 'anonymous' or \

System Information:

User Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.14) 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 (6)

comment:1 Changed 13 years ago by Ryan J Ollos

#6290 may be a duplicate.

comment:2 Changed 13 years ago by Ryan J Ollos

See also #5825 for the PrivateTicketsPlugin.

comment:3 Changed 13 years ago by Ryan J Ollos

Owner: changed from Jeff Hammel to Ryan J Ollos
Status: newassigned

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

comment:4 Changed 13 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(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 13 years ago by Ryan J Ollos

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

comment:6 Changed 9 years ago by Ryan J Ollos

Keywords: "TypeError: iterable argument required" TracHours removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.