Closed jim-easterbrook closed 5 years ago
Commit 8ad61d4 adds options to the editor.ini file to disable Qt5 and/or QtWebEngine.
Here's a short script that tests QtWebEngine.
#!/usr/bin/env python
import sys
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets
def main(argv=None):
print('PyQt {}, Qt {}'.format(
QtCore.PYQT_VERSION_STR, QtCore.QT_VERSION_STR))
app = QtWidgets.QApplication(sys.argv)
view = QtWebEngineWidgets.QWebEngineView()
view.load(QtCore.QUrl("http://qt-project.org/"))
view.show()
return app.exec_()
if __name__ == "__main__":
sys.exit(main())
Any news here? Or workaround? (the script segfaults for me as well)
Does disabling Qt5 and/or QtWebEngine in your config file (editor.ini) help at all?
It falls back to PyQt4 and QtWebKit and the latter is no longer available on account of security.
Ah, that's a real problem. As you can see, the test script is as simple as possible so there is no work around within a Python script. Upgrading or downgrading your PyQt installation seems to be the only option.
I have PyQt4, but how can I do without QtWebKit?
You need either QtWebKit or QtWebEngine. Some versions of PyQt5 ship with QtWebEngine, some with QtWebKit and some with both.
It might be possible to adapt Photini to run without either. The Facebook uploader and map tabs would not be available.
~> photini --version
Photini 2018.2.0, build 1028 (c6281ac)
Python 3.6.4 (default, Jan 03 2018, 13:52:55) [GCC]
PyGI 3.26.1, GExiv2 0.10.6, GObject 2.0
PyQt 5.10.2.dev1804151313, Qt 5.9.4, using QtWebEngine
available styles: Breeze, gtk2, Windows, Fusion
I tried a snapshot of pyqt 5.10.2, no change. Do you think it's an incompatibility? Because downgrading is not really an option and if this problem can't be solved, Photini will have to be pulled from openSUSE.
If the test script won't run then neither will any Python application that uses PyQt and QtWebEngine. I'm using openSUSE Leap 42.3 with PyQt 5.5.1, Qt 5.6.2 and QtWebKit. I'll try it in a tumbleweed virtual machine tomorrow.
Donì't bother, Tumbleweed works. It's the Leap 15.0 beta that doesn't. It's on Qt 5.9 while TW uses 5.10.
My Tumbleweed VM hasn't been updated for a while, it's still on PyQt 5.9, Qt 5.10.0 (Python 3.6.4) and the test script crashes. On a Windows 7 VM I have PyQt 5.10, Qt 5.10.0 and it works OK (Python 3.6.3).
I've updated my Tumbleweed VM to PyQt 5.10, Qt 5.10.0 and the test script still segfaults. Maybe this isn't to do with PyQt version but is a missing dependency problem. QtWebEngine does seem to have quite a few requirements: https://doc.qt.io/qt-5.10/qtwebengine-deploying.html
After much experimenting I've found that installing libglvnd-devel appears to solve the segfault problem (libglvnd was already installed). The test script and Photini both run, but the Bing map doesn't show correctly.
This appears to be the culprit. https://bugreports.qt.io/browse/QTBUG-67537
Thanks a lot for the thorough search. Will try and have that commit backported as patch.
Commit f2f42c2 cures the problem on my Tumbleweed virtual machine.
Confirm. That patch fixes Leap 15.0 too. I guess we're done here.
Commit b9f8a50 seems to fix the blank Bing map problem.
Works for me.
Thanks. Though I expect there's some combination of PyQt and video driver out there that it doesn't work for.
Photini may fail to run with some versions of PyQt. If started from a terminal you may get a "Segmentation fault" error message. If this happens, try using the
--version
option and reporting the details here. For example:My testing so far suggests the problem is with the QtWebEngine replacement for QtWebKit. When this works it's faster, and the Bing map aerial view selector works, so I'd prefer to use it. I think I'm going to have to provide a way of manually disabling it though, as I don't have a definitive list of which PyQt versions are safe.