Windows error JDN out of range?

I have this repeatable error from wxPython on windows.

EventScheduling<wb_frame.OnSpHistory>
Traceback (most recent call last):
  File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 560, in __call__
  File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 570, in stepGenerator
  File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_list_handler_common", line 911, in Cmd_File_History
  File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_history", line 232, in __init__
  File "Build\Installer\build_wb_main\out1.pyz/wx.calendar", line 656, in __init__
PyAssertionError: C++ assertion "jdn > -2" failed at ..\..\src\common\datetime.cpp(1438) in wxDateTime::GetTm(): JDN out of range

Can you tell me what it means and what I have to do to fix things up?

The app is pysvn workbench for windows.

Barry

Barry Scott wrote:

I have this repeatable error from wxPython on windows.

EventScheduling<wb_frame.OnSpHistory>
Traceback (most recent call last):
  File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 560, in __call__
  File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 570, in stepGenerator
  File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_list_handler_common", line 911, in Cmd_File_History
  File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_history", line 232, in __init__
  File "Build\Installer\build_wb_main\out1.pyz/wx.calendar", line 656, in __init__
PyAssertionError: C++ assertion "jdn > -2" failed at ..\..\src\common\datetime.cpp(1438) in wxDateTime::GetTm(): JDN out of range

Can you tell me what it means and what I have to do to fix things up?

"JDN" means Julian Date Number. The assertion failure here says that
you tried to use a date prior to 4713 BCE.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Barry Scott wrote:

I have this repeatable error from wxPython on windows.

EventScheduling<wb_frame.OnSpHistory>
Traceback (most recent call last):
   File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 560, in __call__
   File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 570, in stepGenerator
   File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_list_handler_common", line 911, in Cmd_File_History
   File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_history", line 232, in __init__
   File "Build\Installer\build_wb_main\out1.pyz/wx.calendar", line 656, in __init__
PyAssertionError: C++ assertion "jdn> -2" failed at ..\..\src\common\datetime.cpp(1438) in wxDateTime::GetTm(): JDN out of range

Can you tell me what it means and what I have to do to fix things up?

In wxDateTime::GetTm a julian date number is being calculated from the current value of a wxDateTime and a passed in time zone. Apparently that is resulting in a value < -1 and the assertion is triggered.

http://trac.wxwidgets.org/browser/wxWidgets/trunk/src/common/datetime.cpp#L1359

What is the code in your application at that point? What is the value of any datetime objects in use there? Is it a valid datetime?

···

--
Robin Dunn
Software Craftsman

In wxPython I could not find GetTM to call it before passing in the CalendarCtrl.

I added this code:

       print repr(self.date)
       #for n in dir(self.date):
       # print n
       print repr(self.date.GetJDN())
       print repr(self.date.GetHour())
       self.since_date = wx.calendar.CalendarCtrl( self, -1,
                               self.date,
                               style=wx.calendar.CAL_MONDAY_FIRST )

Which outputs:

<wx.DateTime: "26/08/2013 13:26:03" at _786f6805_p_wxDateTime>
2456531.018090278
13
2013-09-02 13:26:03,971 ERROR EventScheduling<wb_frame.OnSpHistory>
Traceback (most recent call last):
File "C:\Users\Barry\svn\PySVN\WorkBench\Source\wb_app.py", line 567, in __call__
   stepGenerator( self.app, result )
File "C:\Users\Barry\svn\PySVN\WorkBench\Source\wb_app.py", line 577, in stepGenerator
   where_to_go_next = generator.next()
File "C:\Users\Barry\svn\PySVN\WorkBench\Source\wb_subversion_list_handler_common.py", line 909, in Cmd_File_History
   dialog = wb_subversion_history.LogHistoryDialog( self.app, self.app.frame.tree_panel.tree_ctrl )
File "C:\Users\Barry\svn\PySVN\WorkBench\Source\wb_subversion_history.py", line 237, in __init__
   style=wx.calendar.CAL_MONDAY_FIRST )
File "c:\python27\lib\site-packages\wx-2.9.4-msw\wx\calendar.py", line 656, in __init__
   _calendar.CalendarCtrl_swiginit(self,_calendar.new_CalendarCtrl(*args, **kwargs))
PyAssertionError: C++ assertion "jdn > -2" failed at ..\..\src\common\datetime.cpp(1438) in wxDateTime::GetTm(): JDN out of range

Barry

···

On 12 Aug 2013, at 20:43, Robin Dunn <robin@alldunn.com> wrote:

Barry Scott wrote:

I have this repeatable error from wxPython on windows.

EventScheduling<wb_frame.OnSpHistory>
Traceback (most recent call last):
  File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 560, in __call__
  File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 570, in stepGenerator
  File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_list_handler_common", line 911, in Cmd_File_History
  File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_history", line 232, in __init__
  File "Build\Installer\build_wb_main\out1.pyz/wx.calendar", line 656, in __init__
PyAssertionError: C++ assertion "jdn> -2" failed at ..\..\src\common\datetime.cpp(1438) in wxDateTime::GetTm(): JDN out of range

Can you tell me what it means and what I have to do to fix things up?

In wxDateTime::GetTm a julian date number is being calculated from the current value of a wxDateTime and a passed in time zone. Apparently that is resulting in a value < -1 and the assertion is triggered.

wxTrac has been migrated to GitHub Issues - wxWidgets

What is the code in your application at that point? What is the value of any datetime objects in use there? Is it a valid datetime?

Barry Scott wrote:

···

On 12 Aug 2013, at 20:43, Robin Dunn<robin@alldunn.com> wrote:

Barry Scott wrote:

I have this repeatable error from wxPython on windows.

EventScheduling<wb_frame.OnSpHistory>
Traceback (most recent call last):
   File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 560, in __call__
   File "Build\Installer\build_wb_main\out1.pyz/wb_app", line 570, in stepGenerator
   File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_list_handler_common", line 911, in Cmd_File_History
   File "Build\Installer\build_wb_main\out1.pyz/wb_subversion_history", line 232, in __init__
   File "Build\Installer\build_wb_main\out1.pyz/wx.calendar", line 656, in __init__
PyAssertionError: C++ assertion "jdn> -2" failed at ..\..\src\common\datetime.cpp(1438) in wxDateTime::GetTm(): JDN out of range

Can you tell me what it means and what I have to do to fix things up?

In wxDateTime::GetTm a julian date number is being calculated from the current value of a wxDateTime and a passed in time zone. Apparently that is resulting in a value< -1 and the assertion is triggered.

wxTrac has been migrated to GitHub Issues - wxWidgets

What is the code in your application at that point? What is the value of any datetime objects in use there? Is it a valid datetime?

In wxPython I could not find GetTM to call it before passing in the CalendarCtrl.

I added this code:

        print repr(self.date)
        #for n in dir(self.date):
        # print n
        print repr(self.date.GetJDN())
        print repr(self.date.GetHour())
        self.since_date = wx.calendar.CalendarCtrl( self, -1,
                                self.date,
                                style=wx.calendar.CAL_MONDAY_FIRST )

Which outputs:

<wx.DateTime: "26/08/2013 13:26:03" at _786f6805_p_wxDateTime>
2456531.018090278
13
2013-09-02 13:26:03,971 ERROR EventScheduling<wb_frame.OnSpHistory>
Traceback (most recent call last):
  File "C:\Users\Barry\svn\PySVN\WorkBench\Source\wb_app.py", line 567, in __call__
    stepGenerator( self.app, result )
  File "C:\Users\Barry\svn\PySVN\WorkBench\Source\wb_app.py", line 577, in stepGenerator
    where_to_go_next = generator.next()
  File "C:\Users\Barry\svn\PySVN\WorkBench\Source\wb_subversion_list_handler_common.py", line 909, in Cmd_File_History
    dialog = wb_subversion_history.LogHistoryDialog( self.app, self.app.frame.tree_panel.tree_ctrl )
  File "C:\Users\Barry\svn\PySVN\WorkBench\Source\wb_subversion_history.py", line 237, in __init__
    style=wx.calendar.CAL_MONDAY_FIRST )
  File "c:\python27\lib\site-packages\wx-2.9.4-msw\wx\calendar.py", line 656, in __init__
    _calendar.CalendarCtrl_swiginit(self,_calendar.new_CalendarCtrl(*args, **kwargs))
PyAssertionError: C++ assertion "jdn> -2" failed at ..\..\src\common\datetime.cpp(1438) in wxDateTime::GetTm(): JDN out of range

What are your timezone and your locale settings? Does it still happen with 2.9.5?

--
Robin Dunn
Software Craftsman