-
Notifications
You must be signed in to change notification settings - Fork 4
WIP: updates for current LiberTEM version #10
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
base: master
Are you sure you want to change the base?
Conversation
Current dask (since dask/distributed#3461) uses |
|
Hm I get a different error when trying to load a file: Just to make sure we are doing the same thing: I clicked "File -> Import Data..." in Swift, selected an hdf5 file on disk and clicked "Open". That brings up the libertem-plugin dialog for loading files. After filling in the fields in the dialog I clicked "Load" in it, which brings up the above error. Installation instructions for a developer installation of Nion Swift are here: https://github.com/nion-software/nionswift/wiki/Developer-Installation#installation-notes I will also try this again with a fresh installation when I get to it. Just quickly looking into the source code at the place where your error occurs: https://github.com/nion-software/nionui/blob/105cdf44961f99bc8e6561546050117c73e63320/nion/ui/Window.py#L364 Here the event loop gets stopped and then started immediately again. Is is possible that other code also using the event loop can prevent it from being stopped? Or is there a place in libertem that periodically starts the event loop? |
|
Hi Andreas, and thank you for your support!
Ah, I see the problem - I didn't even get that far. I think my installation was not correct and I'll try this from scratch. This error comes from using internal APIs that changed in the meantime - the
Sounds right - I did the same with an MIB dataset.
Thanks!
Hm, no - the only place we are messing with event loops is inside worker threads we start ourselves - outside of that, we just use the existing event loop. I think I really messed up when installing, as a |
|
Btw. I tested on Python 3.10, maybe the Python version also plays a role |
|
I can reproduce the original traceback (""event loop is already running") with the following script: The part where I had to deviate from the wiki was the installation of pyside2, as When I install PyQt5 instead, I get another error: I also tried to use This somehow causes the file to be executed by the shell, and In the end, this doesn't change the error though - if I patch |
I tried to reanimate this plugin for current LiberTEM (and nion) versions. The code runs so far as it doesn't crash at start-up, and it's possible to select files for opening. Sadly, after clicking the "Open" button in the system file dialog, the following error is logged, and clicking the "Load" button doesn't seem to have an effect, beyond closing the load dialog:
I'm not sure what is going wrong there - I thought maybe this is because of fork safety issues, but setting the multiprocessing start method to spawn didn't seem to fix things. Maybe I also did something wrong when installing nion swift, as I didn't find the right link to the development setup docs and did things from memory.
TODO