Opened 13 years ago
Closed 13 years ago
#8859 closed defect (duplicate)
[Patch] ERROR: Macro TracJSGanttChart(milestone=...) failed
Reported by: | Owned by: | Chris Nelson | |
---|---|---|---|
Priority: | high | Component: | TracJsGanttPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
Running trac 0.12 with the latest version of the TracJsGanttPlugin (installed using easy_install this morning). Regardless of whether any other coordinating plugins are installed or not (such as mastertickets, subtickets, timingandestimation), I cannot make a gantt chart display from a very simple existing milestone in Trac (10 tickets, 2 closed, backend repository is Mercurial).
Currently, only tracjsgantt.*
is enabled in my trac.ini
file, and no [trac-jsgantt]
section is defined (all commented out) - see Debug output below. If I try adding back certain fields (as outlined on the TracJSGanttPlugin wiki page), I get different, but similar, errors - issues like:
TypeError: strptime() argument 1 must be string, not int.
and
KeyError: u'userstart'
I'm just trying to display a Gantt chart, nothing fancy (yet). Looking through the other active tickets there appears to be some question whether this plugin works with Trac 0.12. Is that accurate?
From the trac.log file in DEBUG Mode:
03,713 Trac[query] DEBUG: Query SQL: SELECT t.id AS id,t.description AS description,t.owner AS owner,t.type AS type,t.status AS status,t.summary AS summary,t.milestone AS milestone,t.priority AS priority,t.time AS time,t.changetime AS changetime,priority.value AS priority_value FROM ticket AS t LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND priority.name=priority) WHERE ((COALESCE(t.milestone,'')=u'FME Cart Completion')) ORDER BY COALESCE(priority.value,'')='',CAST(priority.value AS integer),t.id 2011-05-31 15:06:03,715 Trac[formatter] ERROR: Macro TracJSGanttChart(milestone=FME Cart Completion) failed: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 710, in _macro_formatter return macro.process(args, in_paragraph=True) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 304, in process text = self.processor(text) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 291, in _macro_processor text) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 733, in expand_macro tasks = self._add_tasks(options) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 706, in _add_tasks self._schedule_tasks() File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 421, in _schedule_tasks t['calc_start'] = _start(t) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 381, in _start finish = datetime.strptime(_finish(ticket), self.pyDateFormat) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 401, in _finish elif ticket[self.fields['succ']] != []:
Attachments (1)
Change History (12)
comment:1 Changed 13 years ago by
Status: | new → assigned |
---|
comment:2 Changed 13 years ago by
Updated using easy_install and verified the changes in the .py file installed. Still having the same error. Here is updated log output. Thanks.
2011-06-01 09:43:52,136 Trac[query] DEBUG: Query SQL: SELECT t.id AS id,t.description AS description,t.owner AS owner,t.type AS type,t.status AS status,t.summary AS sum mary,t.milestone AS milestone,t.priority AS priority,t.time AS time,t.changetime AS changetime,priority.value AS priority_value FROM ticket AS t LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND priority.name=priority) WHERE ((COALESCE(t.milestone,'')=u'FME Cart Completion')) ORDER BY COALESCE(priority.value,'')='',CAST(priority.value AS integer),t.id 2011-06-01 09:43:52,138 Trac[formatter] ERROR: Macro TracJSGanttChart(milestone=FME Cart Completion) failed: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 710, in _macro_formatter return macro.process(args, in_paragraph=True) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 304, in process text = self.processor(text) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 291, in _macro_processor text) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 732, in expand_macro tasks = self._add_tasks(options) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 705, in _add_tasks self._schedule_tasks() File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 420, in _schedule_tasks t['calc_start'] = _start(t) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 382, in _start finish = datetime.datetime(*time.strptime(_finish(ticket), self.pyDateFormat)[0:7]) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 401, in _finish elif ticket[self.fields['succ']] != []: KeyError: None
comment:3 Changed 13 years ago by
On the same system (trac 0.12, python 2.6), with the other plugins installed (as described on the installation) and the custom fields commented out (fields.start and fields.finish) trac.log shows the following:
File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 380, in _start finish = datetime.datetime(*time.strptime(_finish(ticket), self.pyDateFormat)[0:7]) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.5-py2.6.egg/tracjsgantt/tracjsgantt.py", line 405, in _finish f = datetime.datetime(*time.strptime(succ[self.fields['finish']], self.dbDateFormat)[0:7]) File "/usr/lib/python2.6/_strptime.py", line 454, in _strptime_time return _strptime(data_string, format)[0] File "/usr/lib/python2.6/_strptime.py", line 322, in _strptime found = format_regex.match(data_string) TypeError: expected string or buffer
comment:4 Changed 13 years ago by
Description: | modified (diff) |
---|
The patch in #8679 should resolve at least one of your errors (the traceback in that ticket is the same as what you've posted here).
comment:5 Changed 13 years ago by
comment:6 Changed 13 years ago by
Just installed and tested the latest committed changes. Still having what appear to be string parsing issues. Traceback shown below.
2011-07-08 10:23:47,216 Trac[formatter] ERROR: Macro TracJSGanttChart(milestone=EDF Qualification) failed: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 710, in _macro_formatter return macro.process(args, in_paragraph=True) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 304, in process text = self.processor(text) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/wiki/formatter.py", line 291, in _macro_processor text) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.7-py2.6.egg/tracjsgantt/tracjsgantt.py", line 760, in expand_macro tasks = self._add_tasks(options) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.7-py2.6.egg/tracjsgantt/tracjsgantt.py", line 726, in _add_tasks self._schedule_tasks() File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.7-py2.6.egg/tracjsgantt/tracjsgantt.py", line 433, in _schedule_tasks t['calc_start'] = _start(t) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.7-py2.6.egg/tracjsgantt/tracjsgantt.py", line 395, in _start finish = datetime.datetime(*time.strptime(_finish(ticket), self.pyDateFormat)[0:7]) File "/usr/local/lib/python2.6/dist-packages/Trac_jsGantt-0.7-py2.6.egg/tracjsgantt/tracjsgantt.py", line 420, in _finish f = datetime.datetime(*time.strptime(succ[self.fields['finish']], self.dbDateFormat)[0:7]) File "/usr/lib/python2.6/_strptime.py", line 454, in _strptime_time return _strptime(data_string, format)[0] File "/usr/lib/python2.6/_strptime.py", line 322, in _strptime found = format_regex.match(data_string) TypeError: expected string or buffer
comment:7 Changed 13 years ago by
Description: | modified (diff) |
---|
I've found that the plugin doesn't work when date_format
is set to anything other than the default date_format = %Y-%m-%d
. I'll attach a patch for this issue.
Ticket reporter: What date_format
are you using?
Changed 13 years ago by
Attachment: | tracjsganttplugin-r10255.patch added |
---|
comment:8 Changed 13 years ago by
Summary: | ERROR: Macro TracJSGanttChart(milestone=...) failed → [Patch] ERROR: Macro TracJSGanttChart(milestone=...) failed |
---|
comment:10 Changed 13 years ago by
Priority: | normal → high |
---|
comment:11 Changed 13 years ago by
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Will be addressed in #8959 which has a more comprehensive patch.
(In [10253]) Changed date handling to be compatible with Python 2.4. Refs #8859.
I'm not sure if this addresses your specific issue. Please try with this update. Thanks.