[QGIS-Developer] [solved] weird RuntimeError: qgis._gui cannot import type '����' from PytQT5.QtCore"

Even Rouault even.rouault at spatialys.com
Mon Jan 30 06:45:17 PST 2023


Hi,

just to avoid other people losing a couple hours like me... If you 
update to latest master on Debian/Ubuntu, and after rebuild, you get a 
cryptic error like the following when importing qgis_gui:

# PYTHONPATH=output/python QGIS_PREFIX_PATH=output python3 -c "from 
qgis._gui import *"
Traceback (most recent call last):
   File "<string>", line 1, in <module>
RuntimeError: qgis._gui cannot import type '����' from PyQt5.QtCore

Then the fix is to install python3-pyqt5.qtmultimedia. Cf 
https://github.com/qgis/QGIS/commit/324dac16696bff43d637920733eb5ee4cb7b3ddf

Thanks to Alessandro for hinting me on the right direction. I'd wish 
PyQt would output a better error message...

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the QGIS-Developer mailing list