Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is NodeTree supported when running with Qt? #120

Closed
itziakos opened this issue Feb 26, 2015 · 2 comments
Closed

Is NodeTree supported when running with Qt? #120

itziakos opened this issue Feb 26, 2015 · 2 comments

Comments

@itziakos
Copy link
Member

Importing NodeTree when using Qt results in the following tracebackthon

>>> from pyface.tree.api import NodeTree
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\runtimes\simphony\lib\site-packages\pyface\tree\api.py", line 18, in <module>
    from node_tree import NodeTree
  File "c:\runtimes\simphony\lib\site-packages\pyface\tree\node_tree.py", line 28, in <module>
    from tree import Tree
  File "c:\runtimes\simphony\lib\site-packages\pyface\tree\tree.py", line 22, in <module>
    import wx
ImportError: No module named wx

The problem is that the node_tree module is tring to import the tree class from wx. So at first glance it looks that the NodeTree class does not support Qt. However, I have labeled this issue as a bug because in https://github.com/enthought/pyface/blob/master/pyface/tree/api.py#L25 there is a specific check on the ets toolkit which means that this module should have support for Qt. I guess that the easy solution would be to import NodeTree only when wx is used.

@itziakos
Copy link
Member Author

Note I discovered this issue when using the released versions of pyface and mayavi while running a python script that invokes the mayavi2 application

@corranwebster
Copy link
Member

Fixed by #261.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants