Open max3-2 opened 2 years ago
Hey @max3-2, thanks for reporting. On Linux I found that mlab.show()
blocks not only Spyder, but also IPython and qtconsole.
Furthermore, it seems unnecessary because according to its docs:
Start interacting with the figure.
By default, this function simply creates a GUI and starts its
event loop if needed.
But the figure is created and I can interact with it after I run mlab.test_flow()
. Is that not the case for you on Windows?
@ccordoba12 Sorry I probably wasn't clear enough on this one. Interacting does indeed work for the figure, but not the tree. This is a feature which I really came to like in interactive data analysis since you can add more plots and visualization on the go. So, to reproduce (again I'm sorry that I can't screen share right now from my windows machine)
None
due to missing event loop, cf.https://github.com/enthought/traitsui/issues/1853Ok, I tried the steps you mentioned above and got this error in the IPython console:
Traceback (most recent call last):
File "/home/carlos/miniconda3/envs/spyder-stable-cf/lib/python3.7/site-packages/pyface/ui/qt4/action/action_item.py", line 184, in _qt4_on_triggered
self.controller.perform(action, action_event)
File "/home/carlos/miniconda3/envs/spyder-stable-cf/lib/python3.7/site-packages/traitsui/qt4/tree_editor.py", line 1166, in perform
self.ui.do_undoable(self._perform, action)
File "/home/carlos/miniconda3/envs/spyder-stable-cf/lib/python3.7/site-packages/traitsui/ui.py", line 645, in do_undoable
action(*args, **kw)
File "/home/carlos/miniconda3/envs/spyder-stable-cf/lib/python3.7/site-packages/traitsui/qt4/tree_editor.py", line 1169, in _perform
node, object, nid = self._data
TypeError: cannot unpack non-iterable NoneType object
However, this error is not related to Spyder in any way. So, I'd say if you can reproduce it in a Jupyter notebook, it has to do with the Jupyter architecture and not with Spyder.
Please do that and let us know how that goes.
That is the error I am talking about. As stated above,
Running the example for iypthon in ´jupyter qtconsole´ works as expected.
Currently I think something with the spider gui loop might interfere but I have zero idea how to track that down.
@ccordoba12 Could you verify that this works in qtconsole
? If yes, I do see the issue on the side of spyder and would be happy to help if you can give me a rough direction on how to debug a frozen console, e.g. showing the "last call"
@ccordoba12 Bumping this since its somewhat still the same issue as described above. Working in python
, ipython
and jupyer qtconsole
, but in spyder I try
from mayavi import mlab
mlab.test_flow()
or
from mayavi import mlab
%gui qt
both lead to a full block of the console with a needed kernel restart. Can't interrupt or use SIGINT so no errors are reported. Any way to proceed? If you tell me how I can try to get error logs but I think it just hangs at this point
Also: I can do
%gui qt
and keep using spyder but as soon as I call from mayavi import mlab
the block occurs
Problem Description
There are some issues described which may relate but none that reproduces this behavior so I will give this a try. At least to check if its reproducible on other machines. I have added more detail on a mayavi issue (https://github.com/enthought/mayavi/issues/1127) but to sum it up:
python
console, callmlab.show()
IPython
console call%gui qt
before creating plotsFailure to do the above in either environment leads to backend issues when interacting with the figure. The follwing two codes are working examples in both environments which are expected to work and should before proceeding:
Python
iPython
What steps reproduce the problem?
Assuming the ipython version, the behavior should be the same in spyder as the example above. However this is not the case. Initially, after importing, spyder reports a message:
Then, using the ipython version above will show the error initially reported in the mayavi issue, e.g. the event loop will not handle mayavi inputs. Adding
mlab.show()
to combine both soultions, e.g.will actually block the spyder console and the interactive mayavi works as in a default python console. However, after closing the mayavi figure, the console is blocked and needs a hard reset (this is obviously not the case when running the example in a default python console)
Running the example for
iypthon
injupyter qtconsole
works as expected.This is reported for win10 and the versions below. I do not have this issue running macOS.
Versions