Menu

#1428 ValueError: misfire_grace_time must be a positive value

Release_1.3.30
fixed-and-released
None
linux
1
2015-02-21
2013-07-09
No

When I've tried to run taskcoach I've had following exception:

Traceback (most recent call last):
  File "./taskcoach.py", line 71, in <module>
    start()
  File "./taskcoach.py", line 62, in start
    app = application.Application(options, args)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/patterns/singleton.py", line 29, in __call__
    class_.instance = super(Singleton, class_).__call__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/application/application.py", line 98, in __init__
    self.init(**kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/application/application.py", line 180, in init
    self.settings, splash=splash)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/mainwindow.py", line 65, in __init__
    self._create_window_components()  # Not private for test purposes
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/mainwindow.py", line 119, in _create_window_components
    viewer.addViewers(self.viewer, self.taskFile, self.settings)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/factory.py", line 45, in __init__
    self.__add_all_viewers()
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/factory.py", line 49, in __add_all_viewers
    self.__add_viewers(task.TaskViewer)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/factory.py", line 66, in __add_viewers
    **self._viewer_kwargs())
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/patterns/metaclass.py", line 39, in __call__
    instance = super(NumberedInstances, cls).__call__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/task.py", line 766, in __init__
    super(TaskViewer, self).__init__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/mixin.py", line 367, in __init__
    super(SortableViewerForTasksMixin, self).__init__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/mixin.py", line 208, in __init__
    super(SortableViewerMixin, self).__init__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/base.py", line 670, in __init__
    super(ViewerWithColumns, self).__init__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/task.py", line 129, in __init__
    super(BaseTaskTreeViewer, self).__init__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/task.py", line 75, in __init__
    super(BaseTaskViewer, self).__init__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/mixin.py", line 85, in __init__
    super(FilterableViewerMixin, self).__init__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/base.py", line 550, in __init__
    super(TreeViewer, self).__init__(*args, **kwargs)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/base.py", line 60, in __init__
    self.__presentation = self.createSorter(self.createFilter(self.domainObjectsToView()))
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/task.py", line 116, in createFilter
    return super(BaseTaskViewer, self).createFilter(tasks)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/mixin.py", line 38, in createFilter
    presentation = super(SearchableViewerMixin, self).createFilter(presentation)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/gui/viewer/mixin.py", line 150, in createFilter
    **self.viewFilterOptions())
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/domain/task/filter.py", line 30, in __init__
    self.registerObservers()
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/domain/task/filter.py", line 48, in registerObservers
    date.Scheduler().schedule_interval(self.atMidnight, days=1)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/domain/date/scheduler.py", line 102, in schedule_interval
    coalesce=True)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/thirdparty/apscheduler/scheduler.py", line 329, in add_interval_job
    return self.add_job(trigger, func, args, kwargs, **options)
  File "/home/tomlee/work/TaskCoach-1.3.30/taskcoachlib/thirdparty/apscheduler/scheduler.py", line 268, in add_job
    options.pop('coalesce', self.coalesce), **options)
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/job.py", line 53, in __init__
    raise ValueError('misfire_grace_time must be a positive value')
ValueError: misfire_grace_time must be a positive value

I've checked code and fin following line in taskcoachlib/domain/date/scheduler.py

self.__jobs[proxy] = job = self.add_interval_job(callback, days=days, 
            minutes=minutes, seconds=seconds, start_date=start_date, misfire_grace_time=0,
            coalesce=True)

When I change misfire_grace_time=0 to misfire_grace_time=1 it can starts and looks like working right.

Discussion

  • Tomasz Woźniak

    Tomasz Woźniak - 2013-07-09

    Changed line of scheduler.py it is line number 100

     
  • Jérome Laheurte

    Our version of apscheduler in thirdparty should be patched to accept a 0 value as meaning "infinite". Guess I missed a spot.

     
  • Jérome Laheurte

    Waitaminute. According to the traceback it's the system's apscheduler module that is used instead of the included one. Where did you download Task Coach ?

     
  • Tomasz Woźniak

    Tomasz Woźniak - 2013-07-10

    I've downloaded it from taskcoach site as tar package. As I understand - patched apscheduler is used in taskcoach and running taskcoach from source without building doesn't create correct version. Am I right?

    I've run it just from source.

     
  • Jérome Laheurte

    • assigned_to: Jérome Laheurte
     
  • Jérome Laheurte

    I think that happens as soon as apscheduler is installed system-wide. The Debian package didn't exist in 12.x and appeared in Raring AFAIK. You're running Raring, aren't you ?

     
  • Tomasz Woźniak

    Tomasz Woźniak - 2013-07-11

    Yep, I'm on raring :D But local library should be used before system as I remember...

     
  • Jérome Laheurte

    As far as I can see the embedded version of the top-level package is used. But then it imports submodules and that's when the system-wide version is preferred.

     
  • Jérome Laheurte

    A fix was made and checked into the source code repository of Task Coach. The fix will be part of the next release. You will get another notification when that release is available with the request to install the new release and confirm that your issue has indeed been fixed.

    If you like, you can download a recent build from http://www.fraca7.net/TaskCoach-packages/latest_bugfixes.py to test the fix.

    Because a fix has been made for this bug report, the priority of this report has been lowered to 1 and its resolution has been set to 'Fixed'.
    Thanks, Task Coach development team

     
  • Tomasz Woźniak

    Tomasz Woźniak - 2013-07-12

    Thx. I've got question- I would like to write extension for importing task from jira and exporting times spent as jira 'work log'. Have you some suggestions, hints or helpful resources?

     
  • Jérome Laheurte

    Shouldn't be too difficult. Please ask the question again on the taskcoach-dev mailing list, we'll discuss there.

     
  • Jérome Laheurte

    This bug should be fixed in the latest release of Task Coach. Can you please install the latest release of Task Coach and confirm that this bug has indeed been fixed?

    Thanks, Task Coach development team

     
  • Bharath

    Bharath - 2013-11-11

    Hi,

    I got the problem with this bug. I downloaded the files from one of the earlier posts (i.e. http://www.fraca7.net/TaskCoach-packages/latest_bugfixes.py) it's running successfully on my windows, but it seems it's still not installed in the latest version. Actually we are working in a group on task coach, all of my team run latest version successfully, but I can't. I need to work on the latest version of task coach, but it's not working. Could you please suggest me a solution to this problem.

    Thanks!

     

Log in to post a comment.