Import error with wx backend

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

Import error with wx backend

Raphael Walker
Hi,

I updated to the new traits packages (4.4).

But I get the following error when I try to import ImageResource:

 >>> from pyface.api import ImageResource
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
"C:\Users\rwalker\even_sandbox\trunk\felyx\python\pyface-4.4.0-py2.7.egg\pyface\api.py",
line 19, in <module>
     from clipboard import clipboard, Clipboard
   File
"C:\Users\rwalker\even_sandbox\trunk\felyx\python\pyface-4.4.0-py2.7.egg\pyface\clipboard.py",
line 23, in <module>
     clipboard = Clipboard()
   File
"C:\Users\rwalker\even_sandbox\trunk\felyx\python\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
 >>>

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

Re: Import error with wx backend

Robert Kern
On Tue, Dec 17, 2013 at 12:51 PM, Raphael Walker <[hidden email]> wrote:
>
> Hi,
>
> I updated to the new traits packages (4.4).
>
> But I get the following error when I try to import ImageResource:
>
>  >>> from pyface.api import ImageResource
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>    File
> "C:\Users\rwalker\even_sandbox\trunk\felyx\python\pyface-4.4.0-py2.7.egg\pyface\api.py",
> line 19, in <module>
>      from clipboard import clipboard, Clipboard
>    File
> "C:\Users\rwalker\even_sandbox\trunk\felyx\python\pyface-4.4.0-py2.7.egg\pyface\clipboard.py",
> line 23, in <module>
>      clipboard = Clipboard()
>    File
> "C:\Users\rwalker\even_sandbox\trunk\felyx\python\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
>  >>>

We catch ImportErrors to turn them into "nicer" messages about the lack of backend implementation. Unfortunately, it also means that we catch ImportErrors that do not arise from the lack of an implementation. Try directly importing pyface.ui.wx.clipboard and see what error you get.

--
Robert Kern
Enthought

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

Re: Import error with wx backend

Raphael Walker
Ahhh...

Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> import pyface.ui.wx.clipboard
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
"C:\Users\rwalker\even_sandbox\trunk\felyx\python\pyface-4.4.0-py2.7.egg\pyface\ui\wx\clipboard.py",
line 20, in <module>
     from traits.api import provides
ImportError: cannot import name provides
 >>> import traits
 >>> traits
<module 'traits' from
'C:\Python27\lib\site-packages\traits-4.3.0-py2.7-win-amd64.egg\traits\__init__.pyc'>


There is a old traits package (4.3) on the system, that shouldn't be used.
-> Problem solved.

Thanks for the help,
Raphael



On 17.12.2013 13:59, Robert Kern wrote:

> On Tue, Dec 17, 2013 at 12:51 PM, Raphael Walker <[hidden email]
> <mailto:[hidden email]>> wrote:
>  >
>  > Hi,
>  >
>  > I updated to the new traits packages (4.4).
>  >
>  > But I get the following error when I try to import ImageResource:
>  >
>  >  >>> from pyface.api import ImageResource
>  > Traceback (most recent call last):
>  >    File "<stdin>", line 1, in <module>
>  >    File
>  >
> "C:\Users\rwalker\even_sandbox\trunk\felyx\python\pyface-4.4.0-py2.7.egg\pyface\api.py",
>  > line 19, in <module>
>  >      from clipboard import clipboard, Clipboard
>  >    File
>  >
> "C:\Users\rwalker\even_sandbox\trunk\felyx\python\pyface-4.4.0-py2.7.egg\pyface\clipboard.py",
>  > line 23, in <module>
>  >      clipboard = Clipboard()
>  >    File
>  >
> "C:\Users\rwalker\even_sandbox\trunk\felyx\python\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
>  >  >>>
>
> We catch ImportErrors to turn them into "nicer" messages about the lack
> of backend implementation. Unfortunately, it also means that we catch
> ImportErrors that do not arise from the lack of an implementation. Try
> directly importing pyface.ui.wx.clipboard and see what error you get.
>
> --
> Robert Kern
> Enthought
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>

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