Ticket #8679 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Error: Macro TracJSGanttChart(milestone=Test 3) failed

Reported by: falkb Assigned to: ChrisNelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

The error logging is

2011-04-06 16:54:02,874 Trac[formatter] ERROR: Macro TracJSGanttChart(milestone=Test 3) failed: 
Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 717, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 304, in process
    text = self.processor(text)
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 291, in _macro_processor
    text)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 720, in expand_macro
    tasks = self._add_tasks(options)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 693, in _add_tasks
    self._schedule_tasks()
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 417, in _schedule_tasks
    t['calc_start'] = _start(t)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 377, in _start
    finish = datetime.strptime(_finish(ticket), self.pyDateFormat)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 397, in _finish
    elif ticket[self.fields['succ']] != []:
KeyError: None
2011-04-06 16:54:04,013 Trac[main] ERROR: Internal Server Error: 
Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "build\bdist.win32\egg\trac\web\main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\bdist.win32\egg\estimationtools\utils.py", line 74, in process_request
    chart = opener.open(url.encode('utf-8'))
  File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 387, in open
    response = meth(req, response)
  File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 425, in error
    return self._call_chain(*args)
  File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 506, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 414: Request-URI Too Large

1. my configuration is:

[trac-jsgantt]
# To work with Timing and Estimation for percent complete
fields.estimate = estimatedhours
fields.worked = totalhours
# Each unit in estimate is 1/8 of a day
days_per_estimate = 0.125
# To work with Master Tickets for dependencies
#fields.pred = blockedby
#fields.succ = blocking
# To work with Subtickets for parent/child relationships
#fields.parent = parents
# Custom fields for start and due dates
#fields.start = startime
#fields.finish = finishtime
#
date_format = %Y-%m-%d
milestone_type = milestone

I just use the Plugin Timing And Estimation. Master Tickets and Subtickets are not desired currently.

My milestone has about 150 tickets.

My system is Bitnami Trac Stack 0.12.2 via Apache on Windows2003 Server.

Attachments

tracjsganttplugin-r10255.patch (0.7 kB) - added by rjollos on 07/04/11 09:59:51.

Change History

04/06/11 17:08:42 changed by falkb

This was installed as bdist_egg from tracjsganttplugin-r10045.zip

04/08/11 12:09:31 changed by osimons

Note that second error ('HTTPError: HTTP Error 414: Request-URI Too Large') is a problem that originates with EstimationToolsPlugin, see #8686.

07/04/11 09:55:55 changed by rjollos

I'm seeing the same error and have the same log trace that leads up to

File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 397, in _finish
    elif ticket[self.fields['succ']] != []:

It looks like there is a simple error in the code that is revealed when fields.succ is not defined. I'll post the patch below.

07/04/11 09:59:51 changed by rjollos

  • attachment tracjsganttplugin-r10255.patch added.

(follow-up: ↓ 5 ) 07/06/11 17:18:10 changed by rjollos

Btw, I have global commit access to t-h.o, so I'd be happy to apply this patch to the repository if you give approval.

(in reply to: ↑ 4 ) 07/06/11 17:34:33 changed by ChrisNelson

  • status changed from new to assigned.

Replying to rjollos:

Btw, I have global commit access to t-h.o, so I'd be happy to apply this patch to the repository if you give approval.

Thanks but it's easier for me to track if I apply it locally then push our changes. I'll try to do that tomorrow.

07/07/11 16:28:16 changed by ChrisNelson

(In [10389]) Prevents errors when there is no successor field. Refs #8859, #8679.

(follow-up: ↓ 8 ) 07/08/11 09:04:03 changed by anonymous

I reinstalled this plugin via 'python setup.py bdist_egg' from tracjsganttplugin-r10396.zip, have tested it (with that certain trac.ini configuration (see ticket description above)) and can confirm the bug has been fixed - no misbehaviour or even warning logging anymore. I think this ticket can be closed now. Thanks very much!

(in reply to: ↑ 7 ) 07/08/11 09:05:22 changed by falkb

Replying to anonymous:

I reinstalled ...

It was me. I forgot to set my username :)

07/08/11 09:21:07 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

I've installed 0.7 and can confirm that this is fixed as well.

(Let me know if you prefer to keep tickets open, otherwise I'll close the other tickets I've opened after I've finished testing)

Thanks!


Add/Change #8679 (Error: Macro TracJSGanttChart(milestone=Test 3) failed)




Change Properties
Action