Error when running tutorial code

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error when running tutorial code

Glenn Ramsey
Hi,

I'm trying to follow the tutorial here:

http://docs.enthought.com/traitsui/tutorials/traits_ui_scientific_app.html

When running the first code snippet:

http://docs.enthought.com/traitsui/_static/code_block1.py

I get the error below.

I'm guessing that I haven't installed or configured something. How do I
fix this?

Glenn

   File "/home/glenn/Projects/dmeo/one.py", line 55, in <module>
     camera.configure_traits()
   File "/usr/lib/python2.7/dist-packages/traits/has_traits.py", line
2544, in configure_traits
     kind, handler, id, scrollable, args )
   File "/usr/lib/python2.7/dist-packages/traitsui/wx/toolkit.py", line
219, in view_application
     id, scrollable, args )
   File
"/usr/lib/python2.7/dist-packages/traitsui/wx/view_application.py", line
80, in view_application
     scrollable, args ).ui.result
   File
"/usr/lib/python2.7/dist-packages/traitsui/wx/view_application.py", line
123, in __init__
     super( ViewApplication, self ).__init__()
   File
"/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
8081, in __init__
     wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
   File
"/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
7981, in __init__
     self._BootstrapApp()
   File
"/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line
7555, in _BootstrapApp
     return _core_.PyApp__BootstrapApp(*args, **kwargs)
   File
"/usr/lib/python2.7/dist-packages/traitsui/wx/view_application.py", line
140, in OnInit
     args       = self.args )
   File "/usr/lib/python2.7/dist-packages/traitsui/view.py", line 433, in ui
     ui.ui( parent, kind )
   File "/usr/lib/python2.7/dist-packages/traitsui/ui.py", line 218, in ui
     self.rebuild( self, parent )
   File "/usr/lib/python2.7/dist-packages/traitsui/wx/toolkit.py", line
139, in ui_live
     import ui_live
   File "/usr/lib/python2.7/dist-packages/traitsui/wx/ui_live.py", line
34, in <module>
     from ui_panel \
   File "/usr/lib/python2.7/dist-packages/traitsui/wx/ui_panel.py", line
53, in <module>
     from pyface.dock.api \
   File
"/usr/local/lib/python2.7/dist-packages/pyface-4.4.0-py2.7.egg/pyface/dock/api.py",
line 31, in <module>
     from dock_window \
   File
"/usr/local/lib/python2.7/dist-packages/pyface-4.4.0-py2.7.egg/pyface/dock/dock_window.py",
line 36, in <module>
     from pyface.api import SystemMetrics
   File
"/usr/local/lib/python2.7/dist-packages/pyface-4.4.0-py2.7.egg/pyface/api.py",
line 19, in <module>
     from clipboard import clipboard, Clipboard
   File
"/usr/local/lib/python2.7/dist-packages/pyface-4.4.0-py2.7.egg/pyface/clipboard.py",
line 23, in <module>
     clipboard = Clipboard()
   File
"/usr/local/lib/python2.7/dist-packages/pyface-4.4.0-py2.7.egg/pyface/toolkit.py",
line 92, in __init__
     raise NotImplementedError("the %s pyface backend doesn't implement
%s" % (ETSConfig.toolkit, oname))
NotImplementedError: the wx pyface backend doesn't implement Clipboard

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error when running tutorial code

Rob McMullen
Try setting the ETS_DEBUG environmental variable and see what the real error is, e.g.

ETS_DEBUG=true python code_block1.py

The toolkit importing uses an abstraction layer that sometimes hides the real problem.

What wx version are you using? I was able to run it successfully using wx 2.8.12. wx 2.9.x also sort-of works (the Edit Properties dialog does appear), but there's an initial sizing problem unrelated to your issue.

Rob

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error when running tutorial code

Glenn Ramsey
On 28/02/14 11:07, Rob McMullen wrote:

> Try setting the ETS_DEBUG environmental variable and see what the real
> error is, e.g.
>
> ETS_DEBUG=true python code_block1.py
>
> The toolkit importing uses an abstraction layer that sometimes hides the
> real problem.
>
> What wx version are you using? I was able to run it successfully using
> wx 2.8.12. wx 2.9.x also sort-of works (the Edit Properties dialog does
> appear), but there's an initial sizing problem unrelated to your issue.
>
> Rob

Thanks Rob,

I was attempting to run it from PyDev in Eclipse. I now see that it
works when run from the command line. I just needed to make sure that
PyDev had updated its paths by restarting Eclipse and I have it working
now. It hadn't occurred to me do that before because usually PyDev just
works after installing stuff without requiring any action.

FWIW I have version libwxgtk2.8-0  2.8.12.1-6ubuntu2

Glenn
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev