I am getting the error, ImportError: PyQt4 classes cannot be imported in QGIS 3.x. Use PyQt5 or the version independent qgis.PyQt import instead. I looked through the Python code looking for a missed PyQt4 import but couldn't find any so I posted here, maybe you can help me figure out whats wrong. No one else seems to have the issue using QGIS 3.4 LTR. Full error below.
ImportError: PyQt4 classes cannot be imported in QGIS 3.x. Use PyQt5 or the version independent qgis.PyQt import instead.
Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview__init__.py", line 34, in classFactory
from .go2streetview import go2streetview
File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview\go2streetview.py", line 26, in
from .go2streetviewDialog import go2streetviewDialog, dumWidget,snapshotLicenseDialog, infobox
File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview\go2streetviewDialog.py", line 29, in
import resources_rc
File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\resources_rc.py", line 9, in
from PyQt4 import QtCore
File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 670, in _import
raise ImportError(msg)
ImportError: PyQt4 classes cannot be imported in QGIS 3.x.
Use PyQt5 or the version independent qgis.PyQt import instead.
Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.4.5-Madeira Madeira, 89ee6f6e23
I am getting the error, ImportError: PyQt4 classes cannot be imported in QGIS 3.x. Use PyQt5 or the version independent qgis.PyQt import instead. I looked through the Python code looking for a missed PyQt4 import but couldn't find any so I posted here, maybe you can help me figure out whats wrong. No one else seems to have the issue using QGIS 3.4 LTR. Full error below.
ImportError: PyQt4 classes cannot be imported in QGIS 3.x. Use PyQt5 or the version independent qgis.PyQt import instead. Traceback (most recent call last): File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview__init__.py", line 34, in classFactory from .go2streetview import go2streetview File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview\go2streetview.py", line 26, in from .go2streetviewDialog import go2streetviewDialog, dumWidget,snapshotLicenseDialog, infobox File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview\go2streetviewDialog.py", line 29, in import resources_rc File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\resources_rc.py", line 9, in from PyQt4 import QtCore File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 670, in _import raise ImportError(msg) ImportError: PyQt4 classes cannot be imported in QGIS 3.x. Use PyQt5 or the version independent qgis.PyQt import instead.
Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.4.5-Madeira Madeira, 89ee6f6e23