Menu

#44 Pmw 2.0.0 EntryField demo crashes on python 3.4.3

None
open-fixed
Adrian
None
5
2015-03-23
2015-03-22
No

The Pmw 2.0.0 release built against python 3.4.3 on x86_64-apple-darwin14 exhibits the following failure when the EntryField demo widget is selected from the All.py demos window under python 3.4.3.

TypeError Exception in Tk callback
  Function: <function ScrolledListBox.__init__.<locals>.releaseEvent at 0x104ee88c8> (type: <class 'function'>)
  Args: (<tkinter.Event object at 0x105066dd8>,)
  Event type: ButtonRelease (type num: 5)
Traceback (innermost last):
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1760, in __call__
    return self.func(*args)
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 87, in releaseEvent
    _handleEvent(event, 'release')
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 377, in _handleEvent
    _listboxCache[event.widget]._handleEvent(event, eventType)
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 344, in _handleEvent
    command()
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1632, in callback
    rtn = self._command(*args)
  File "All.py", line 193, in startDemo
    self.widget = eval(demoName + '.Demo(frame)')
  File "<string>", line 1, in <module>
    None
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/demos/EntryField.py", line 38, in __init__
    'fmt' : 'ymd'},
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 92, in __init__
    self.initialiseoptions()
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 606, in initialiseoptions
    func()
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 168, in _validate
    self._checkValidity()
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 260, in _checkValidity
    valid = self._getValidity()
  File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 236, in _getValidity
    status = dictio['validator'](*(text,), **args)
TypeError: datevalidator() got an unexpected keyword argument 'fmt'

================================================
  Event contents:
    char: ??
    delta: 0
    height: ??
    keycode: ??
    keysym: ??
    keysym_num: ??
    num: 1
    send_event: False
    serial: 1217
    state: 256
    time: 1058654474
    type: 5
    widget: .4377599056.4377641984.4377642040.4377644616.4377642208
    width: ??
    x: 62
    x_root: 70
    y: 141
    y_root: 181

Discussion

  • Jack Howarth

    Jack Howarth - 2015-03-22

    A similar crash is seen in the HistoryField widget from the All.py demos window under python 3.4.3...

    TypeError Exception in Tk callback
      Function: <function ScrolledListBox.__init__.<locals>.releaseEvent at 0x104ee88c8> (type: <class 'function'>)
      Args: (<tkinter.Event object at 0x105066dd8>,)
      Event type: ButtonRelease (type num: 5)
    Traceback (innermost last):
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1760, in __call__
        return self.func(*args)
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 87, in releaseEvent
        _handleEvent(event, 'release')
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 377, in _handleEvent
        _listboxCache[event.widget]._handleEvent(event, eventType)
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 344, in _handleEvent
        command()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1632, in callback
        rtn = self._command(*args)
      File "All.py", line 193, in startDemo
        self.widget = eval(demoName + '.Demo(frame)')
      File "<string>", line 1, in <module>
        None
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/demos/EntryField.py", line 38, in __init__
        'fmt' : 'ymd'},
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 92, in __init__
        self.initialiseoptions()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 606, in initialiseoptions
        func()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 168, in _validate
        self._checkValidity()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 260, in _checkValidity
        valid = self._getValidity()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 236, in _getValidity
        status = dictio['validator'](*(text,), **args)
    TypeError: datevalidator() got an unexpected keyword argument 'fmt'
    
    ================================================
      Event contents:
        char: ??
        delta: 0
        height: ??
        keycode: ??
        keysym: ??
        keysym_num: ??
        num: 1
        send_event: False
        serial: 1217
        state: 256
        time: 1058654474
        type: 5
        widget: .4377599056.4377641984.4377642040.4377644616.4377642208
        width: ??
        x: 62
        x_root: 70
        y: 141
        y_root: 181
    
    [Jack-Howarths-Computer:Pmw/Pmw_2_0_0/demos] howarth% python3.4 All.py
    AttributeError Exception in Tk callback
      Function: <function ScrolledListBox.__init__.<locals>.releaseEvent at 0x1120688c8> (type: <class 'function'>)
      Args: (<tkinter.Event object at 0x1121e6dd8>,)
      Event type: ButtonRelease (type num: 5)
    Traceback (innermost last):
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1760, in __call__
        return self.func(*args)
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 87, in releaseEvent
        _handleEvent(event, 'release')
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 377, in _handleEvent
        _listboxCache[event.widget]._handleEvent(event, eventType)
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 344, in _handleEvent
        command()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1632, in callback
        rtn = self._command(*args)
      File "All.py", line 193, in startDemo
        self.widget = eval(demoName + '.Demo(frame)')
      File "<string>", line 1, in <module>
        None
      File "/sw/src/fink.build/pmw2-py34-2.0.0-1/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/demos/HistoryText.py", line 41, in __init__
        ['Next', self.historyText.__next__],
    AttributeError: 'HistoryText' object has no attribute '__next__'
    
    ================================================
      Event contents:
        char: ??
        delta: 0
        height: ??
        keycode: ??
        keysym: ??
        keysym_num: ??
        num: 1
        send_event: False
        serial: 1227
        state: 256
        time: 1058853001
        type: 5
        widget: .4597275728.4597318656.4597318712.4597321288.4597321456
        width: ??
        x: 70
        x_root: 78
        y: 179
        y_root: 219
    
     
  • Jack Howarth

    Jack Howarth - 2015-03-22

    The same failures are seen with Pmw 2.0.0 run against python 3.3.6 on x86_64-apple-darwin12 using tcl/tk 8.5.18. The original report for python 3.4.3 was run against tcl/tk 8.6.4.

     
  • Adrian

    Adrian - 2015-03-22

    Jack,

    Thanks for the report. There are two different issues there:

    There also seem to be multiple issues showing up in the tests so repackaging will have to wait until I can clear all of them; I haven't gotten around to them yet so I can't offer an estimate, hopefully it will be this week.

     
  • Adrian

    Adrian - 2015-03-22
    • assigned_to: Adrian
    • Group: -->
     
  • Adrian

    Adrian - 2015-03-22

    Fixed in 2.0.1-alpha

     
  • Adrian

    Adrian - 2015-03-22
    • status: open --> open-fixed
     
  • Jack Howarth

    Jack Howarth - 2015-03-23

    One last issues with 'format' exists in the Counter demo...

    Counter.py: entryfield_validate = {'validator' : 'date', 'format' : 'dmy'},
    Counter.py: datatype = {'counter' : 'date', 'format' : 'dmy', 'yyyy' : 1})
    Counter.py: entryfield_validate = {'validator' : 'date', 'format' : 'ymd',
    Counter.py: datatype = {'counter' : 'date', 'format' : 'ymd', 'yyyy' : 1,

    changing these to 'fmt' solves the failure...

    TypeError Exception in Tk callback
      Function: <function ScrolledListBox.__init__.<locals>.releaseEvent at 0x10e626730> (type: <class 'function'>)
      Args: (<tkinter.Event object at 0x10e7cbe48>,)
      Event type: ButtonRelease (type num: 5)
    Traceback (innermost last):
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1776, in __call__
        return self.func(*args)
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 87, in releaseEvent
        _handleEvent(event, 'release')
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 377, in _handleEvent
        _listboxCache[event.widget]._handleEvent(event, eventType)
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwScrolledListBox.py", line 344, in _handleEvent
        command()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 1648, in callback
        rtn = self._command(*args)
      File "All.py", line 193, in startDemo
        self.widget = eval(demoName + '.Demo(frame)')
      File "<string>", line 1, in <module>
        None
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/demos/Counter.py", line 26, in __init__
        datatype = {'counter' : 'date', 'format' : 'dmy', 'yyyy' : 1})
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwCounter.py", line 68, in __init__
        Pmw.EntryField, (frame,))
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 547, in createcomponent
        widget = widgetClass(*widgetArgs, **kw)
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 92, in __init__
        self.initialiseoptions()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 622, in initialiseoptions
        func()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 168, in _validate
        self._checkValidity()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 260, in _checkValidity
        valid = self._getValidity()
      File "/sw/src/fink.build/pmw2-py34-2.0.0-3/Pmw-2.0.0/build/lib/Pmw/Pmw_2_0_0/lib/PmwEntryField.py", line 236, in _getValidity
        status = dictio['validator'](*(text,), **args)
    TypeError: datevalidator() got an unexpected keyword argument 'format'
    
    ================================================
      Event contents:
        char: ??
        delta: 0
        height: ??
        keycode: ??
        keysym: ??
        keysym_num: ??
        num: 1
        send_event: False
        serial: 1193
        state: 256
        time: 1198728588
        type: 5
        widget: .4536176424.4536204368.4536204424.4536537328.4536204760
        width: ??
        x: 56
        x_root: 64
        y: 94
        y_root: 134
    

    I also see 'format' present in Args.py...

    Args.py: format = '\n %-' + str(max) + 's %s'
    Args.py: rtn = rtn + format % (arg, definition)

    but assume this usage isn't problematic.

     
  • Adrian

    Adrian - 2015-03-23

    These issues should have been solved by the package I uploaded yesterday but that is the correct change. There was a situation in which, under Python 3.0, the 'format' keyword broke some functionality, this is why I renamed it in the date utils. All other instances of 'format' should stay the same.

     

Log in to post a comment.

MongoDB Logo MongoDB