Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4410 closed defect (fixed)

Error in Roadmap view: argument 2 to map() must support iteration

Reported by: jorge.churio@… Owned by: k0s
Priority: high Component: TracHoursPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

After loaded revision of Trac Hours, when I try to show the Roadmap, the folowwing error appears:

argument 2 to map() must support iteration

Python's Traceback is:

File "main.py", line 423, in _dispatch_requestFile "main.py", line 219, in dispatchFile "C:\Python25\Lib\site-packages\trac\web\chrome.py", line 690, in render_template

stream |= self._filter_stream(req, method, filename, stream, data)

File "C:\Python25\Lib\site-packages\genshi\core.py", line 128, in or

return Stream(_ensure(function(self)), serializer=self.serializer)

File "C:\Python25\Lib\site-packages\trac\web\chrome.py", line 777, in inner

data)

File "c:\python25\lib\site-packages\TracHoursPlugin-0.2.-py2.5.egg\trachours\hours.py", line 244, in filter_stream

stream = handler(req, stream, data)

File "c:\python25\lib\site-packages\TracHoursPlugin-0.2.-py2.5.egg\trachours\hours.py", line 1054, in filter_roadmap

totalhours = self.get_total_hours(ticket.id)

File "c:\python25\lib\site-packages\TracHoursPlugin-0.2.-py2.5.egg\trachours\hours.py", line 1010, in get_total_hours

return sum([hourseconds_worked? for hour in self.get_ticket_hours(ticket_id)])

File "c:\python25\lib\site-packages\TracHoursPlugin-0.2.-py2.5.egg\trachours\hours.py", line 989, in get_ticket_hours

where = "ticket in (%s)" % ",".join(map(str, ticket_id)) #note the lack of args. This is because there's no way to do a placeholder for a list that I can see.

System Information:

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Trac: 0.11.1
Python: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
setuptools: 0.6c9
MySQL: server: "5.0.51b-community-nt", client: "5.0.27", thread-safe: 1
MySQLdb: 1.2.2
Genshi: 0.5.1
mod_python: 3.3.1
Subversion: 1.5.3 (r33570)
jQuery: 1.2.6

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by k0s

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

(In [5115]) convert to int before calling get_hours; hopefully fixes #4410

comment:2 Changed 6 years ago by k0s

i've made a fix that might work, but don't know if what I did actually helps. somehow, you are getting a ticket.id that is not an int. I don't know how that would happen. If this doesn't help, maybe at least the error message is more helpful. In any case, I need to figure out what ticket_id is, if not an int, and how it would possibly get this way.

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.