Hi Jérôme,

It seems wxScheduler (in taskcoach-trunk) has some date-calculation issues:

Traceback (most recent call last):
  File 
"C:\Users\Frank\Documents\NetBeansProjects\taskcoach\taskcoachlib\thirdparty\calendar\wxSchedulerPaint.py",
line 57, in CalcMin
    return self._minSizeCallback()
  File 
"C:\Users\Frank\Documents\NetBeansProjects\taskcoach\taskcoachlib\thirdparty\calendar\wxSchedulerPaint.py",
line 477, in CalcMinSize
    0, 0, size.GetWidth(), 0)
  File 
"C:\Users\Frank\Documents\NetBeansProjects\taskcoach\taskcoachlib\thirdparty\calendar\wxSchedulerPaint.py",
line 441, in DoPaint
    return self._paintMonthly(drawer, day, x, y, width, height)
  File 
"C:\Users\Frank\Documents\NetBeansProjects\taskcoach\taskcoachlib\thirdparty\calendar\wxSchedulerPaint.py",
line 407, in _paintMonthly
    w, h = self._paintPeriod(drawer, day, end.Subtract(day).GetDays(),
x, y, width, height)
  File 
"C:\Users\Frank\Documents\NetBeansProjects\taskcoach\taskcoachlib\thirdparty\calendar\wxSchedulerPaint.py",
line 205, in _paintPeriod
    x, y + offsetY, width, height)
  File 
"C:\Users\Frank\Documents\NetBeansProjects\taskcoach\taskcoachlib\thirdparty\calendar\wxDrawer.py",
line 140, in DrawScheduleHorizontal
    size, position, total = self.ScheduleSize(schedule, workingHours,
day, daysCount)
  File 
"C:\Users\Frank\Documents\NetBeansProjects\taskcoach\taskcoachlib\thirdparty\calendar\wxDrawer.py",
line 202, in ScheduleSize
    startHourCopy.SetDay(currentDay.GetDay())
  File "c:\program
files\python25\lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py", line
3664, in SetDay
    return _misc_.DateTime_SetDay(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "(0 < day) && (day <=
GetNumberOfDays(month, year))" failed at
..\..\src\common\datetime.cpp(1466) in wxDateTime::Set(): Invalid date

It looks like these lines (389, 399, 407) in wxSchedulerPaint.py may be wrong:

end = utils.copyDateTime(day)
end.AddDS(wx.DateSpan(months=1))
...
w, h = self._paintPeriod(drawer, day, end.Subtract(day).GetDays(), x,
y, width, height)

I get the traceback with one task with start date Feb 1st and due date
March 1s when showing all tasks in the Calendar viewer, displaying the
month March.

Cheers, Frank

Reply via email to