[PyQt] (no subject)

mid pan.totoro at gmail.com
Thu Nov 28 16:10:21 GMT 2019


Hello, I'm trying to use QWebBrowserView in a program of mine, but any
time I use it (setUrl, setHtml) it crashes and prints "Could not find
QWebEngineProcess.exe". If I install Python to a completely ASCII path
it works, but then Python crashes silently if I just close the window
with a QWebEngineView in it.

The minimal reproduction steps are:
- Install Python 3 (into a path which has Unicode content such as
Cyrillic, in my case the username was Адміністратор)
- python -m pip install pyqt5
- python -m pip install pyqtwebengine
- Interpret:

    from PyQt5.QtCore import QLibraryInfo
    from PyQt5.QtWidgets import *
    from PyQt5.QtWebEngineWidgets import QWebEngineView
    import sys

    application = QApplication(sys.argv)

    print(QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath))

    window = QWidget()
    window.resize(640, 480)

    browser = QWebEngineView(window)
    browser.setHtml("<h1>booboohoohoo</h1>")

    window.show()
    sys.exit(application.exec_())
On Linux it works fine (probably because of my path being fully ASCII
or because it's not Windows), but on Windows it prints the
LibraryExecutablesPath (where the Unicode part is mangled) and then
crashes with the message I mentioned above.

Are there any short-term fixes/ways to avoid this issue?

Sorry for any formatting errors, first time messaging a mailing list.


More information about the PyQt mailing list