SUMMARY With PySide 5.13 (plus commit 5376a134f13124b9b228dd160f151a7c8eccd09a to fix a crash) python plugins don't load: Traceback (most recent call last): File "/usr/lib/qt/plugins/falkon/python/hellopython/hellopython.py", line 29, in init plugins = Falkon.MainApplication.instance().plugins() AttributeError: 'PySide2.QtCore.QCoreApplication' object has no attribute 'plugins'
Caused by eihter 80a6f91c553eaf9ed4d7d002a5abb442693e8e08 (which is also the commit that causes the crash) or 5376a134f13124b9b228dd160f151a7c8eccd09a
I have the same problem loading Python plugins with PySide2 5.13, although Falkon does not crash for me.
I have no idea what's wrong, it seems like on the Python side it always sees the MainApplication as QCoreApplication object instead. In other words, passing subclass of QCoreApplication to Python will downcast it to QCoreApplication.
I created an issue (report) at Qt bug tracker. https://bugreports.qt.io/browse/PYSIDE-1135 In hope that they will know where the problem is.
Hello, there is a patch in Qt (shiboken) which needs to be tested. If you want to progress this issue please test the patch and report back to Qt. The test need to be done with Qt 5.13.1++ (in which it does not work) and with Python 3.7. Python 3.8 is still unsupported. You can get the patch at: https://codereview.qt-project.org/c/pyside/pyside-setup/+/281443 Report back at Qt or here and I will send it for you: https://bugreports.qt.io/browse/PYSIDE-1135
Fixed upstream https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?h=5.14&id=0b6dd91fbd02e4de1f653e2a8cd6e892628dac0c
Not fixed yet, unfortunately
Like Antonio I have been able to get past the PyFalkon loading problem, but now stuck here:- Traceback (most recent call last): File "/home/chaz/.local/lib64/plugins/falkon/middleclickloader/__init__.py", line 21, in <module> from middleclickloader.mcl_handler import MCL_Handler File "/home/chaz/.local/lib64/plugins/falkon/middleclickloader/mcl_handler.py", line 23, in <module> from middleclickloader.mcl_settings import MCL_Settings File "/home/chaz/.local/lib64/plugins/falkon/middleclickloader/mcl_settings.py", line 21, in <module> from middleclickloader.i18n import i18n File "/home/chaz/.local/lib64/plugins/falkon/middleclickloader/i18n.py", line 25, in <module> localedir = QtCore.QStandardPaths.locate(QtCore.QStandardPaths.GenericDataLocation, 'locale', QtCore.QStandardPaths.LocateDirectory) TypeError: 'PySide2.QtCore.QStandardPaths.locate' called with wrong argument types: PySide2.QtCore.QStandardPaths.locate(StandardLocation, str, LocateOption) Supported signatures: PySide2.QtCore.QStandardPaths.locate(PySide2.QtCore.QStandardPaths.StandardLocation, str, PySide2.QtCore.QStandardPaths.LocateOptions = PySide2.QtCore.QStandardPaths.LocateOption.LocateFile) Failed to import module "middleclickloader"
Devs at Qt are working on it, they proposed few patches already. But because I have limited time to check and properly test them the work is going slowly. So far all of them failed to meet our needs. If you wish to help go to: https://bugreports.qt.io/browse/PYSIDE-1135 > Like Antonio I have been able to get past the PyFalkon loading problem, but now stuck here:- @ChrisHills as I pointed in linked issue, you did not get any farther, it crashed sooner. Try this extensions and tell me if it works for you (from my unrefined and unfinished series): https://github.com/SGOrava/FalkonPythonTutorial/tree/master/extensions/Tutorial3
*** Bug 415513 has been marked as a duplicate of this bug. ***
Hello, it seems we got past the main issue. See https://codereview.qt-project.org/c/pyside/pyside-setup/+/285655 Some plugins might need some changes though (say Hello to new bugs).
Fixed with PySide2/Shiboken2 5.14.1 (it should be built against it).