Dear Alex, If I recall correctly, this feature worked for me when I last tried it a couple of weeks ago. Maybe it’s a Qt issue. Which Qt version are you using? Also could you enter this issue in our bug tracking system including your quick fix? https://phabricator.mitk.org/
I am currently out of office, but I can take a look at it when I am back. Cheers, Peter Von: Alex Lisovich <[email protected]> Gesendet: Dienstag, 18. Juni 2019 00:44 An: [email protected] Betreff: Re: [mitk-users] org.mitk.gui.qt.python plugin fails to run on Windows Dear All, Sorry for a long post, but here it goes: For the last few days I was trying to compile/run the org.mitk.gui.qt.python Python pligin. Basically, it compiles just fine, but when trying to load (both in Release and Debug mode) it generates (and displays instead of Python console) the following message: "Part Initialization Error: Default constructed ServiceReference is not valid input to GetService()". Running it in Debug mode revealed that this is the result of throwing the exception within the ModuleContext::GetService(const ServiceReferenceBase& reference) as a result of PythonService not being registered at the moment of call which in turn happens within the mitk::PythonActivator::Load() during the call to PythonService constructor and BEFORE the PythonService is actually get registered. Further digging in MITK forum archives, I came along the thread [mitk-users] Can't run Python plugin<https://sourceforge.net/p/mitk/mailman/message/34810888/> initiated by Matt Clarkson describing exactly the same problem and dated back to 2016. During the discussion, Miklos Espak provided the explanation for this phenomenon (bug in PythonQT related to static variables initialization) and outlined 3 ways to fix the problem, second of them being moving all PythonQT initialization related code from the static initialization. Using his second suggestion I was able to successfully implement "quick and dirty" fix allowing to plugin load and run just fine (including SimpleITK import, images drag and drop, simple processing etc). So after all this hassle, I basically have two questions: (1) It looks the Python plugin has been broken on Windows since 2016 and likely since MITK 2015 release (that's what Miklos is saying in thread above). Was anybody able to successfully run it on Windows since then, and if yes, was it fixed somehow outside of the master branch or I am missing something? (2) The Python Console window text colors are such that it is practically impossible to see anything you type (in "Light" theme it is fine). Does anybody know if there is some qml (or xml) file with default colors I can modify (the colorare defined as Q_PROPERTY's within the code)? P.S. I am running Windows 7 64 bit, the MITK was configured using CMake 3.14.3 and compiled on VS 2017 Professional. Best Regards, and sorry again for a supre-long post, Alex
_______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
