Modify

Opened 2 years ago

Closed 16 months ago

#10382 closed defect (worksforme)

chart display error: TypeError: can't compare datetime.date to NoneType

Reported by: falkb Owned by: anbo
Priority: normal Component: ProjectPlanPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

Maybe it has something to do that other plugins force me to use the datetime format YYYY-MM-DD, and a few tickets don't have a datetime set. ProjectPlan seems only to support DD/MM/YYYY, MM/DD/YYYY and DD.MM.YYYY:

[2012-09-28 14:03:11,845 p3928:t3664] pprenderimpl.py:120 WARNING: getDateOfSegment: invalid literal for int() with base 10: '20/0' DD.MM.YYYY 20/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] ppticketsperuserday.py:214 ERROR: 'NoneType' object has no attribute 'isocalendar' 20/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] pprenderimpl.py:120 WARNING: getDateOfSegment: invalid literal for int() with base 10: '21/0' DD.MM.YYYY 21/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] ppticketsperuserday.py:214 ERROR: 'NoneType' object has no attribute 'isocalendar' 21/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] pprenderimpl.py:120 WARNING: getDateOfSegment: invalid literal for int() with base 10: '22/0' DD.MM.YYYY 22/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] ppticketsperuserday.py:214 ERROR: 'NoneType' object has no attribute 'isocalendar' 22/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] pprenderimpl.py:120 WARNING: getDateOfSegment: invalid literal for int() with base 10: '23/0' DD.MM.YYYY 23/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] ppticketsperuserday.py:214 ERROR: 'NoneType' object has no attribute 'isocalendar' 23/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] pprenderimpl.py:120 WARNING: getDateOfSegment: invalid literal for int() with base 10: '24/0' DD.MM.YYYY 24/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] ppticketsperuserday.py:214 ERROR: 'NoneType' object has no attribute 'isocalendar' 24/02/2012
[2012-09-28 14:03:11,845 p3928:t3664] formatter.py:768 ERROR: Macro ProjectPlan(combine_filters=AND,filterlike_milestone=test1,segments=20/02/2012;21/02/2012;22/02/2012;23/02/2012;24/02/2012,renderer=tableticketperuserday,owners=a;b,cssclass=blacktable, useimages=Y, summary=chart,showaggregatedstate=T,statistics=elapsed_time/estimated_time) failed: 
Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 765, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 356, in process
    text = self.processor(text)
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 343, in _macro_processor
    text)
  File "build\bdist.win32\egg\projectplan\projectplan.py", line 348, in expand_macro
    renderer.render( ts ),
  File "build\bdist.win32\egg\projectplan\pprender.py", line 1169, in render
    return self.concreteRenderer.render( ticketset )
  File "build\bdist.win32\egg\projectplan\renderer\ppticketsperuserday.py", line 256, in render
    if  self.showAggregatedTicketState()  and  calendar[segment]['date'] < currentDate:
TypeError: can't compare datetime.date to NoneType

What can I do?

Attachments (0)

Change History (6)

comment:1 Changed 18 months ago by anonymous

Rechecked. does still not work with todays SVN version.

comment:2 Changed 17 months ago by anbo

  • Status changed from new to assigned

Hopefully a patch release will be published soon.

comment:3 Changed 17 months ago by anbo

(In [13092]) v1.2.0, minor release

changes:

  • improved the behavior of the javascript date picker (now beta), refs #10626:
    • now using jQuery date picker
    • now allowing more date formats
  • date format, refs #10382:
    • now the date format YYYY-MM-DD is allowed

comment:4 Changed 17 months ago by anbo

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

YYYY-MM-DD is now supported too, hopefully no such error will appear now. Please do not hesitate to report any error you are observing.

comment:5 Changed 17 months ago by falkb

  • Resolution worksforme deleted
  • Status changed from closed to reopened

still does not work, see comment:ticket:10626:7

comment:6 Changed 16 months ago by anbo

  • Resolution set to worksforme
  • Status changed from reopened to closed

at v2.1.0 I added some more constraints. Please report if the problem still appears.

Add Comment

Modify Ticket

Action
as 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.