[Flent-users] PyQt returns SystemError when loading GUI on OS X
Hi I'm the maintainer of the Flent tool, which uses PyQt for its GUI. I recently got a bug report which showed odd behaviour on OS X. Specifically, setupUi() returns: SystemError: returned a result with an error set With what appears to be an underlying: AttributeError: __getattribute__ The error seems to occur only on OS X with PyQt5. It does not occur with PySide2. It also seems to be a new bug (the GUI has worked fine on OS X before). Is this a bug in PyQt, or is there something else going on here? The bug report with more detail is here: https://github.com/tohojo/flent/issues/167 Thanks, -Toke ___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] Unable to use flent-gui from 83d14d68 (#167)
Thank you very much, both Toke ans Pete: QT_API=pyside2 ./run-flent --gui did the trick, now I guess I either write a small wrapper around run-flent or simply put the export in my .bashrc. Anyway with this the GUI runs and loads data files again. Again Best Regards & Thanks > On Jul 16, 2019, at 09:53, Toke Høiland-Jørgensen wrote: > > Sebastian Moeller writes: > >> Mmmh, so I installed qtpy (and dependencies) I now get: >> >> ./run-flent --gui >> Started Flent 1.9.9-git-43e16d5 using Python 3.7.4. >> Initialised matplotlib v3.1.1 on numpy v1.16.4. >> GUI loaded. Using Qt through pyqt5 v5.12.3. >> objc[13628]: Class FIFinderSyncExtensionHost is implemented in both >> /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit >> (0x7fff9b6ec3d8) and >> /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride >> (0x12662cf50). One of the two will be used. Which one is undefined. >> ERROR: Error while loading data file: '> connectSlotsByName> returned a result with an error set'. Skipping. >> >> The GUI opens again, but I still see the same lock-up that Pete >> initially saw. Going to bed for now, maybe I find time to poke this >> tomorrow... > > Well, you'll still need to switch from PyQt5 to PySide2 - installing the > latter is not enough, sadly, you'll also need to either set the QT_API > environment variable, or uninstall PyQt5... > > -Toke ___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] Unable to use flent-gui from 83d14d68 (#167)
It looks like it was still using PyQt5 in your case, so make sure to first do: ``` export QT_API= pyside2 ``` If this is a long-term fix for Mac, maybe that var could be set on MacOS when sys.platform is darwin, assuming we have a chance to do so before those libs are initialized. Probably best would be if they fixed PyQt5. :) -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/167#issuecomment-511707373___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] Unable to use flent-gui from 83d14d68 (#167)
Sebastian Moeller writes: > Mmmh, so I installed qtpy (and dependencies) I now get: > > ./run-flent --gui > Started Flent 1.9.9-git-43e16d5 using Python 3.7.4. > Initialised matplotlib v3.1.1 on numpy v1.16.4. > GUI loaded. Using Qt through pyqt5 v5.12.3. > objc[13628]: Class FIFinderSyncExtensionHost is implemented in both > /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit > (0x7fff9b6ec3d8) and > /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride > (0x12662cf50). One of the two will be used. Which one is undefined. > ERROR: Error while loading data file: ' > returned a result with an error set'. Skipping. > > The GUI opens again, but I still see the same lock-up that Pete > initially saw. Going to bed for now, maybe I find time to poke this > tomorrow... Well, you'll still need to switch from PyQt5 to PySide2 - installing the latter is not enough, sadly, you'll also need to either set the QT_API environment variable, or uninstall PyQt5... -Toke ___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] Unable to use flent-gui from 83d14d68 (#167)
``` export QT_API=pyside2 ``` A space had crept in my previous post after the equals. :) -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/167#issuecomment-511709586___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org
Re: [Flent-users] [tohojo/flent] Unable to use flent-gui from 83d14d68 (#167)
Pete Heist writes: > It looks like it was still using PyQt5 in your case, so make sure to first do: > > ``` > export QT_API= pyside2 > ``` > > If this is a long-term fix for Mac, maybe that var could be set on > MacOS when sys.platform is darwin, assuming we have a chance to do so > before those libs are initialized. Probably best would be if they > fixed PyQt5. :) Yeah, I'm not really sure what the long-term solution should be. I guess I can try sending an email to the PyQt5 mailing list and see if anyone responds... -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/167#issuecomment-511714362___ Flent-users mailing list Flent-users@flent.org http://flent.org/mailman/listinfo/flent-users_flent.org