New submission from leopoldo:

the code below crash when run on anaconda3



import traits.api as trapi
import traitsui.api as trui

from traits.api import HasTraits, Str, Range, Enum

class Person(HasTraits):
    name = Str('Jane Doe')
    age = Range(low=0)
    gender = Enum('female', 'male')

person = Person(age=30)

from traitsui.api import Item, RangeEditor, View

person_view = View(
    Item('name'),
    Item('gender'),
    Item('age', editor=RangeEditor(mode='spinner')),
    buttons=['OK', 'Cancel'],
    resizable=True,
)


person.configure_traits(view=person_view)
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-18-3929f77bb9e4> in <module>()
----> 1 person.configure_traits(view=person_view)

/home/leopoldo/anaconda3/lib/python3.6/site-packages/traits/has_traits.py in 
configure_traits(self, filename, view, kind, edit, context, handler, id, 
scrollable, **args)
   2169                 context = self
   2170             rc = toolkit().view_application( context, self.trait_view( 
view ),
-> 2171                                            kind, handler, id, 
scrollable, args )
   2172             if rc and (filename is not None):
   2173                 fd = None

/home/leopoldo/anaconda3/lib/python3.6/site-packages/traitsui/toolkit.py in 
view_application(self, context, view, kind, handler, id, scrollable, args)
    289 
    290         """
--> 291         raise NotImplementedError
    292 
    293     
#---------------------------------------------------------------------------

NotImplementedError:

----------
messages: 291611
nosy: leopoldotosi
priority: normal
severity: normal
status: open
title: anaconda3::traitsu::NotImplementedError
type: crash
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30066>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to