Modify ↓
Opened 13 years ago
Closed 13 years ago
#9441 closed defect (fixed)
Error: unsupported operand type(s) for *: 'NoneType' and 'float'
Reported by: | Ryan J Ollos | Owned by: | Chris Nelson |
---|---|---|---|
Priority: | normal | Component: | TracJsGanttPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
I have a test configuration in which the worked and estimate fields are not defined.
I get the following traceback with r10837:
01:08:26 PM Trac[formatter] ERROR: Macro TracJSGanttChart(milestone=milestone1) failed: Traceback (most recent call last): File "/home/rjollos/Workspace/th9300/trac-0.11-stable/trac/wiki/formatter.py", line 491, in _macro_formatter return macro.process(args, in_paragraph=True) File "/home/rjollos/Workspace/th9300/trac-0.11-stable/trac/wiki/formatter.py", line 180, in process text = self.processor(text) File "/home/rjollos/Workspace/th9300/trac-0.11-stable/trac/wiki/formatter.py", line 167, in _macro_processor text) File "/home/rjollos/Workspace/tracjsganttplugin/0.11/tracjsgantt/tracjsgantt.py", line 1105, in expand_macro tasks = self._add_tasks(options) File "/home/rjollos/Workspace/tracjsganttplugin/0.11/tracjsgantt/tracjsgantt.py", line 1063, in _add_tasks self._schedule_tasks(options) File "/home/rjollos/Workspace/tracjsganttplugin/0.11/tracjsgantt/tracjsgantt.py", line 729, in _schedule_tasks _schedule_task_alap(t) File "/home/rjollos/Workspace/tracjsganttplugin/0.11/tracjsgantt/tracjsgantt.py", line 635, in _schedule_task_alap hours = self._workHours(options, t) File "/home/rjollos/Workspace/tracjsganttplugin/0.11/tracjsgantt/tracjsgantt.py", line 509, in _workHours hours = est * self.hpe TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
I'm not sure how you want to deal with this, but it seems like you can either set estimate to 0
rather than None
or add a conditional near the end of the method:
if est: hours = est * self.hpe else: ...
Attachments (0)
Change History (4)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Status: | new → assigned |
---|
This works for me when I remove my configuration for the estimate and worked fields.
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
No complaints in over a week. Assume this is working as well for others as it is for me.
Note: See
TracTickets for help on using
tickets.
#9508 is essentially a duplicate of this ticket.