Modify

Opened 3 years ago

Closed 3 years ago

#9653 closed defect (fixed)

getting it working again after commit avalanche on 30/Dec/2011

Reported by: falkb Owned by: ChrisNelson
Priority: high Component: TracJsGanttPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.12

Description (last modified by rjollos)

after update to todays version:

2012-01-01 21:41:10,078 Trac[formatter] ERROR: Macro TracJSGanttChart(milestone=milestone1) 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 606, in expand_macro
    tasks = self._add_tasks(options)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 544, in _add_tasks
    self.pm.postQuery(options, self.tickets)
  File "build\bdist.win32\egg\tracjsgantt\tracpm.py", line 542, in postQuery
    self._add_milestones(options, tickets)
  File "build\bdist.win32\egg\tracjsgantt\tracpm.py", line 450, in _add_milestones
    milestoneTicket = self.pm._pseudoTicket(id,
AttributeError: 'TracPM' object has no attribute 'pm'

Attachments (0)

Change History (23)

comment:1 Changed 3 years ago by ChrisNelson

  • Status changed from new to assigned

Well, that's embarrassing.

comment:2 Changed 3 years ago by ChrisNelson

(In [11087]) Wrong scope for pseudoticket function. Refs #9653.

comment:3 follow-up: Changed 3 years ago by falkb

  • Summary changed from Error: Macro TracJSGanttChart(milestone=milestone1) failed 'TracPM' object has no attribute 'pm' to getting it working again after commit avalanche on 30/Dec/2011

[11087] helps for the error described above, thanks!

next error after update to [11087], (very much appreciating your work (!) but you should consider to setup a test environment for a set of cases):

[2012-01-02 09:06:09,565 p5620:t2576] formatter.py:720 ERROR: Macro TracJSGanttChart(milestone=XX X-XXXX1 - XX|XX X-XXXX2 - XX,userMap=0,format=week,resolution!=duplicate|invalid|wontfix|worksforme) 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 606, in expand_macro
    tasks = self._add_tasks(options)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 544, in _add_tasks
    self.pm.postQuery(options, self.tickets)
  File "build\bdist.win32\egg\tracjsgantt\tracpm.py", line 542, in postQuery
    self._add_milestones(options, tickets)
  File "build\bdist.win32\egg\tracjsgantt\tracpm.py", line 450, in _add_milestones
    milestoneTicket = self._pseudoTicket(id,
AttributeError: 'TracPM' object has no attribute '_pseudoTicket'

comment:4 Changed 3 years ago by falkb

  • Priority changed from normal to high

comment:5 Changed 3 years ago by ChrisNelson

(In [11096]) Typo in pseudoTicket function name. Refs #9653.

comment:6 in reply to: ↑ 3 Changed 3 years ago by ChrisNelson

Replying to falkb:

[11087] helps for the error described above, thanks!

next error after update to [11087], (very much appreciating your work (!) but you should consider to setup a test environment for a set of cases):
...

I actually do have a test environment but had some of the charts disabled while I worked on scheduling algorithms so it was easier to see the changes. (My prime motivation in integrating the multiple-charts-per-page patch was to allow me to have one page with all my test tests on it but sometimes that's just too much information.)

comment:7 follow-ups: Changed 3 years ago by falkb

Thanks. next step done :-) Now:

Cannot find an implementation of the "ITaskScheduler" interface named "CalendarScheduler".  Please update the option TracPM.scheduler in trac.ini.

I activated "CalendarScheduler (tracjsgantt.tracpm.*)" and the chart comes up now. Is it right that I have to activate it? Do I need to activate the other 2 new ones (SimpleCalender, TracPM) as well?

comment:8 in reply to: ↑ 7 ; follow-up: Changed 3 years ago by falkb

Replying to falkb:

Do I need to activate the other 2 new ones (SimpleCalender, TracPM) as well?

I activated all 3 ones now but it makes no visible difference.

Well, sorry for the bad news, now all ticktes are shown with duration 1 day here (which is wrong), start and end date are displayed as today (1/2/2012) and all ticket dependencies are lost in the chart display (no connection lines anymore)...

comment:9 in reply to: ↑ 7 Changed 3 years ago by ChrisNelson

Replying to falkb:

Thanks. next step done :-) Now:

Cannot find an implementation of the "ITaskScheduler" interface named "CalendarScheduler".  Please update the option TracPM.scheduler in trac.ini.

I activated "CalendarScheduler (tracjsgantt.tracpm.*)" and the chart comes up now.

Great!

Is it right that I have to activate it? Do I need to activate the other 2 new ones (SimpleCalender, TracPM) as well?

I've struggled with getting ExtensionOption working. It *should* work as written as I understand the documentation. I've asked on the trac-users (or trac-dev?) list and not gotten much useful help.

comment:10 in reply to: ↑ 8 ; follow-up: Changed 3 years ago by ChrisNelson

Replying to falkb:

Replying to falkb:

Do I need to activate the other 2 new ones (SimpleCalender, TracPM) as well?

I activated all 3 ones now but it makes no visible difference.

Well, sorry for the bad news, now all ticktes are shown with duration 1 day here (which is wrong), start and end date are displayed as today (1/2/2012) and all ticket dependencies are lost in the chart display (no connection lines anymore)...

Is there anything in your trac.log?

comment:11 in reply to: ↑ 10 ; follow-up: Changed 3 years ago by falkb

Replying to ChrisNelson:

Is there anything in your trac.log?

not with WARNING level. Timeout here for now... I'm gonna come back later with DEBUG level logging if you want to...

comment:12 in reply to: ↑ 11 ; follow-ups: Changed 3 years ago by ChrisNelson

Replying to falkb:

Replying to ChrisNelson:

Is there anything in your trac.log?

not with WARNING level. Timeout here for now... I'm gonna come back later with DEBUG level logging if you want to...

Aha! Now I remember. Several of the former Trac-jsGantt settings have moves with the refactoring of the PM stuff into it's own module.

[TracPM]
date_format = %Y-%m-%d
fields.estimate = estimatedhours
fields.finish = userfinish
fields.parent = parents
fields.pred = blockedby
fields.start = userstart
fields.succ = blocking
fields.worked = totalhours
milestone_type = inchpebble

I'll update the documentation on the plugin page (and the in-line documentation, too, if it's wrong).

comment:13 in reply to: ↑ 12 Changed 3 years ago by ChrisNelson

Replying to ChrisNelson:

...
I'll update the documentation on the plugin page (and the in-line documentation, too, if it's wrong).

Plugin page updated.

comment:14 Changed 3 years ago by ChrisNelson

(In [11097]) Clarify where options are configured. Refs #9653.

comment:15 Changed 3 years ago by rjollos

  • Description modified (diff)

comment:16 in reply to: ↑ 12 ; follow-ups: Changed 3 years ago by falkb

Replying to ChrisNelson:

Aha! Now I remember. Several of the former Trac-jsGantt settings have moves with the refactoring of the PM stuff into it's own module.

[TracPM]

Replying to ChrisNelson:

Aha! Now I remember. Several of the former Trac-jsGantt settings have moves with the refactoring of the PM stuff into it's own module.

[TracPM]

Yes, that renaming the trac.ini section from trac-jsgantt to TracPM helps to get further.

  1. Which options actually remain in trac-jsgantt?
  2. for backward-compatibility, isn't it a good idea to keep with trac-jsgantt?
  3. If it's not shared by more than one plugin, isn't it a good idea to use the plugin name as section name?

Well, now we can go on and get to a next error:

[2012-01-03 08:37:48,849 p2600:t1092] formatter.py:720 ERROR: Macro TracJSGanttChart(milestone=XX X-XXXX1 - XX|XX X-XXXX2 - XX,userMap=0,format=week,resolution!=duplicate|invalid|wontfix|worksforme) 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 606, in expand_macro
    tasks = self._add_tasks(options)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 570, in _add_tasks
    tasks += self._format_ticket(ticket, options)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 480, in _format_ticket
    task += '"%s",' % self.pm.percentComplete(ticket)
  File "build\bdist.win32\egg\tracjsgantt\tracpm.py", line 308, in percentComplete
    worked = float(ticket[self.fields['worked']])
ValueError: empty string for float()

I'll update the documentation on the plugin page (and the in-line documentation, too, if it's wrong).

The wiki still mentions that old section name.

comment:17 in reply to: ↑ 16 ; follow-up: Changed 3 years ago by falkb

Replying to falkb:

ValueError: empty string for float()

This patch should help as fix:

  • tracjsganttplugin/0.11/tracjsgantt/tracpm.py

     
    305305            if (estimate == 0): 
    306306                percent = 0 
    307307            else: 
    308                 worked = float(ticket[self.fields['worked']]) 
     308                workedStr = ticket[self.fields['worked']] 
     309                if workedStr == '': 
     310                    worked = 0 
     311                else: 
     312                    worked = float(workedStr) 
    309313                percent = '%s/%s' % (worked, estimate) 
    310314        # Use percent if provided 
    311315        elif self.isCfg('percent'): 

Now with that local patch the chart comes up without warnings again!

comment:18 in reply to: ↑ 17 Changed 3 years ago by ChrisNelson

Replying to falkb:

Replying to falkb:

ValueError: empty string for float()

This patch should help as fix:

  • tracjsganttplugin/0.11/tracjsgantt/tracpm.py

     
    305305            if (estimate == 0): 
    306306                percent = 0 
    307307            else: 
    308                 worked = float(ticket[self.fields['worked']]) 
     308                workedStr = ticket[self.fields['worked']] 
     309                if workedStr == '': 
     310                    worked = 0 
     311                else: 
     312                    worked = float(workedStr) 
    309313                percent = '%s/%s' % (worked, estimate) 
    310314        # Use percent if provided 
    311315        elif self.isCfg('percent'): 

Now with that local patch the chart comes up without warnings again!

Thanks. I *swear* I've put that patch in before. Maybe it got lost in refactoring.

comment:19 in reply to: ↑ 16 ; follow-up: Changed 3 years ago by ChrisNelson

Replying to falkb:

...
Yes, that renaming the trac.ini section from trac-jsgantt to TracPM helps to get further.

  1. Which options actually remain in trac-jsgantt?

The site-wide default overrides (e.g., option.userMap=0).

  1. for backward-compatibility, isn't it a good idea to keep with trac-jsgantt?
  1. If it's not shared by more than one plugin, isn't it a good idea to use the plugin name as section name?

This is a first step toward breaking TracPM out into its own plugin that can support not just jsGantt but also others like a WBS editor, etc.

Well, now we can go on and get to a next error:
...
ValueError: empty string for float()

I'll update the documentation on the plugin page (and the in-line documentation, too, if it's wrong).

The wiki still mentions that old section name.

I see that the configuration section has an example of [TracPM] and the option table says you can put site-wide default overrides in [trac-jsgantt]. What are you referring to?

comment:20 in reply to: ↑ 19 ; follow-up: Changed 3 years ago by falkb

Replying to ChrisNelson:

I see that the configuration section has an example of [TracPM] and the option table says you can put site-wide default overrides in [trac-jsgantt]. What are you referring to?

I wasn't aware of the difference between site-wide default overrides and that breakout stuff. Now it's clear and fine with me. I think after committing that patch from above you can close this ticket now. Thanks for your fast reply. :-)

comment:21 Changed 3 years ago by ChrisNelson

(In [11103]) Handle blank worked values. Refs #9653.

comment:22 in reply to: ↑ 20 Changed 3 years ago by ChrisNelson

Replying to falkb:

Replying to ChrisNelson:

I see that the configuration section has an example of [TracPM] and the option table says you can put site-wide default overrides in [trac-jsgantt]. What are you referring to?

I wasn't aware of the difference between site-wide default overrides and that breakout stuff. Now it's clear and fine with me. I think after committing that patch from above you can close this ticket now. Thanks for your fast reply. :-)

Thanks for your feedback!

comment:23 Changed 3 years ago by ChrisNelson

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

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 ChrisNelson. 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.