Closed sebi06 closed 2 years ago
Hi @sebi06,
I forgot testing macrokit
in Python < 3.9 and that type annotation is not supported in Python 3.8.
I'll fix it soon but if you want to try them now you could make another environment with Python 3.9 installed.
I'll let you know after I fix it.
Thank you!
Now the error message is gone, but nothing shows up. For a fraction of a second there seems to be a window poping up, but there is no graph_viewer window etc.
/home/sebi06/miniconda3/envs/napari-env/bin/python /datadisk1/tuxedo/Github/magic-class/examples/advanced/graph_viewer.py Process finished with exit code 0
I've just fixed bugs so I think you can also try with python 3.8.
Running GUI with python
command always face that problem because just after opening the main widget python itself stops. You can use -i
option, like .../python -i .../example_file.py
to prevent python from exiting immediately. But it may be safer to open Jupyter Notebook or Jupyter QtConsole and copy-and-pasting the code in it.
Hi @sebi06,
I found a way to prevent the main window from quitting while keep API consistent. In v0.5.14
you can just call .../python .../example_file.py
to try any scripts.
Sorry for inconvenience but I hope this update will help you.
I am facing exactly the same issue using python 3.11.3 magic-class 0.7.6: calling examples with python example.py just quits the main window immediately. running python -i example.py works however, the interpreter runs even if I quit the main window. Is this expected? How am I supposed to run the examples?
Hi @captainhunt ,
thank you for letting me know, probably some changes since this issue being closed caused the problem...
I'm thinking of letting users to specify whether it is needed to run the application so that the window keeps showing, just like magicgui
and napari
(in current implementation magic-class automatically determine whether to run or not).
I'll reopen this as another issue and hopefully fix it soon.
running python -i example.py works however, the interpreter runs even if I quit the main window.
This behavior is expected eitherway, as -i
indicates that the Python interpreter should be launched, which is independent of the GUI.
Hi,
I tried to run any of the example on my Python 3.8 on a Ubuntu 20.04 but get always errors like this:
Any hint what I am doing wrong here?