Opened 9 months ago

Closed 8 months ago

Last modified 8 months ago

#68006 closed defect (fixed)

I have an PyQt5.QtWebEngineWidgets error, when I'm trying to use Qgis2threejs

Reported by: enoch777 Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: nilason (Nicklas Larsson)
Port: qgis3-ltr

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I have an error with Missing dependencies related to PyQt5 and QtWebkit.

The window says:

Please install "python3-pyqt5.qtwebkit" package (Debian/Ubuntu) before using this plugin

Then, another windows:

ModuleNotFoundError: No module named 'PyQt5.QtWebKit'

I did:

sudo port install py-pyqt5 +webengine +webkit

But the problem is still there

Attachments (1)

main.log.zip (2.6 MB) - added by enoch777 9 months ago.
main.log result from sudo port install qgis3-ltr

Change History (14)

comment:1 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: nilason added
Description: modified (diff)
Owner: set to Veence
Status: newassigned
Type: requestdefect

comment:2 Changed 9 months ago by nilason (Nicklas Larsson)

Assuming you are have installed qgis3-ltr with default Python 3.11 bindings, try:

sudo port install py311-pyqt5 +webkit

comment:3 Changed 9 months ago by nilason (Nicklas Larsson)

@enoch777 Did you have opportunity to test my suggestion?

comment:4 Changed 9 months ago by enoch777

Yes, I tried suggestion. But, it doesn't work. Finally, I uninstalled everything as described in the guide at the following link: https://guide.macports.org/chunked/installing.macports.uninstalling.html. Then, I reinstalled MacPorts, then I do sudo port install qgis3-ltr, but now i have a new problem:

---> Building qgis3-ltr Error: Failed to build qgis3-ltr: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3-ltr/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port qgis3-ltr failed

Changed 9 months ago by enoch777

Attachment: main.log.zip added

main.log result from sudo port install qgis3-ltr

comment:5 Changed 9 months ago by nilason (Nicklas Larsson)

According the log file you have also homebrew installed and that is making the build fail. You probably need to uninstall homebrew (or if possible inactivate it).

comment:6 Changed 9 months ago by enoch777

Well, I uninstall homebrew. And now I have Qgis again =) I tried: sudo port install py311-pyqt5 +webkit And I still have the initial problem, a window with this message: Missing dependencies related to PyQt5 and QtWebKit. Please install "python3-pyqt5.qtwebkit" package (Debian/Ubuntu) before using this plugin. And then the error:

ModuleNotFoundError: No module named 'PyQt5.QtWebKit' 
Traceback (most recent call last):
  File "/Applications/MacPorts/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eaguirre/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/__init__.py", line 8, in classFactory
    from .qgis2threejs import Qgis2threejs
  File "/Applications/MacPorts/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eaguirre/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/qgis2threejs.py", line 16, in 
    from .q3dwindow import Q3DWindow
  File "/Applications/MacPorts/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eaguirre/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/q3dwindow.py", line 25, in 
    from .ui.q3dwindow import Ui_Q3DWindow
  File "/Applications/MacPorts/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eaguirre/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/ui/q3dwindow.py", line 286, in 
    from Qgis2threejs.q3dview import Q3DView
  File "/Applications/MacPorts/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/eaguirre/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Qgis2threejs/q3dview.py", line 16, in 
    from PyQt5.QtWebKit import QWebSettings, QWebSecurityOrigin
  File "/Applications/MacPorts/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'PyQt5.QtWebKit'

But, Additional I have:

faulthandler.enable(file=fault_handler_file)

Traceback (most recent call last):
  File "", line 1, in 
PermissionError: [Errno 1] Operation not permitted

Last edited 9 months ago by enoch777 (previous) (diff)

comment:7 Changed 9 months ago by nilason (Nicklas Larsson)

There is a bug with py3xx-pyqt5 +webkit, see https://trac.macports.org/ticket/68073.

comment:8 in reply to:  7 Changed 9 months ago by enoch777

Thank you very much. Well, we'll have to wait for it to be resolved. Other than that, everything is working fine =)

comment:9 Changed 8 months ago by nilason (Nicklas Larsson)

The fix is now committed, please try py311-pyqt5 +webkit again.

comment:10 in reply to:  9 ; Changed 8 months ago by enoch777

Thank you!!! Well, at first it did not work. Then, I uninstalled everything to reinstall all again, and after that... it works!!!

Replying to nilason:

The fix is now committed, please try py311-pyqt5 +webkit again.

comment:11 in reply to:  10 Changed 8 months ago by nilason (Nicklas Larsson)

Replying to enoch777:

Thank you!!! Well, at first it did not work. Then, I uninstalled everything to reinstall all again, and after that... it works!!!

Replying to nilason:

The fix is now committed, please try py311-pyqt5 +webkit again.

Glad it did it!

I'm not sure what you mean with "everything", but if that meant a reinstallment of MacPorts it was most likely unnecessary. It is crucial to update locally the state and changes of the "port tree" (after a bug fix or other update), this you do with sudo port selfupdate, from there on you can (re-)install a problematic port. Sometimes it is necessary to clean up the build locally with e.g. sudo port clean py311-pyqt5.

comment:12 Changed 8 months ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

comment:13 Changed 8 months ago by nilason (Nicklas Larsson)

In 41a01a9fd31253c141116fb167416b64a478fecb/macports-ports (master):

qgis3[-ltr]: general overhaul and bug fixes

Notable changes:

  • Find out path to "mpi.h" for building against 'gdal +hdf5' (and remove mpi port group dependence)
  • Prettify PostgreSQL variant descriptions by removing dot in versions 10+
  • Fix flawed implementation of the +python_support variant
  • Fix failure to install grass dependency
  • Add note on plugin "missing PyQt5.QtWebKit module" error warning

Closes: #67842
See: #68006
Closes: #68016
Closes: #68081

Note: See TracTickets for help on using tickets.