You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024-11-08T12:09:41 CRITICAL Traceback (most recent call last):
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 426, in startPlugin
plugins[packageName] = package.classFactory(iface)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/Pablo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\zoomrc_init.py", line 35, in classFactory
from .zoomrc import ZoomRC
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 966, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/Pablo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\zoomrc\zoomrc.py", line 29, in
from .gui.zoomrc_dockwidget import ZoomRCDockWidget
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 966, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/Pablo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\zoomrc\gui\zoomrc_dockwidget.py", line 32, in
from zoomrc.core.catastroTools import CatastroTools
File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 966, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/Pablo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\zoomrc\core\catastroTools.py", line 27, in
from qgis.gui import QgsRubberBand, Qgis
ImportError: cannot import name 'Qgis' from 'qgis.gui' (C:\OSGeo4W/apps/qgis/./python\qgis\gui_init.py). Did you mean: 'qgis'?
Quizá haya una solución más limpia, pero lo he resuelto con la ayuda de ChatGPT, editando catastroTools.py y he dejado así los import del principio:
from urllib import request, parse
from xml.dom import minidom
from qgis.core import QgsVectorLayer, QgsRectangle, QgsProject
from qgis.gui import QgsRubberBand
from PyQt5.QtGui import QColor
# Importación condicional de Qgis para compatibilidad con varias versiones
try:
from qgis.core import Qgis # Intentar importar desde qgis.core (para versiones más nuevas)
except ImportError:
from qgis.gui import Qgis # En caso de error, importar desde qgis.gui (para versiones anteriores)
The text was updated successfully, but these errors were encountered:
Hola @fpsampayo
En QGIS 3.40.0, al abrir, da este error:
Quizá haya una solución más limpia, pero lo he resuelto con la ayuda de ChatGPT, editando catastroTools.py y he dejado así los import del principio:
The text was updated successfully, but these errors were encountered: