nextgis / quickmapservices

QGIS plugin to find and add map services to a project in one click
http://plugins.qgis.org/plugins/quick_map_services/
GNU General Public License v2.0
170 stars 49 forks source link

Python errors - initGui can't be loaded #222

Closed lemrm closed 3 years ago

lemrm commented 3 years ago
Konnte Erweiterung 'quick_map_services' nicht laden aufgrund eines Fehlers beim Aufruf der initGui() Methode 

AttributeError: type object 'QgsMessageLog' has no attribute 'CRITICAL' 
Traceback (most recent call last):
  File "/home/lemrm/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/data_sources_list.py", line 68, in _fill_data_sources_list
    ds = DataSourceSerializer.read_from_ini(ini_full_path)
  File "/home/lemrm/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/data_source_serializer.py", line 93, in read_from_ini
    ConfigReaderHelper.try_read_config(parser, 'wms', 'url', reraise=(ds.type == KNOWN_DRIVERS.WMS), default=""),
  File "/home/lemrm/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/config_reader_helper.py", line 9, in try_read_config
    val = parser.get(section, param)
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.8/3.8.10/lib/python3.8/configparser.py", line 799, in get
    return self._interpolation.before_get(self, section, option, value,
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.8/3.8.10/lib/python3.8/configparser.py", line 395, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.8/3.8.10/lib/python3.8/configparser.py", line 442, in _interpolate_some
    raise InterpolationSyntaxError(
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%3AWX-Produkt&bbox=-443.462%2C-4758.645%2C456.538%2C-3658.645&width=628&height=768&srs=EPSG%3A1000001&styles=&format=application%2Fopenlayers3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 360, in startPlugin
    plugins[packageName].initGui()
  File "/home/lemrm/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/quick_map_services.py", line 123, in initGui
    self.build_menu_tree()
  File "/home/lemrm/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/quick_map_services.py", line 198, in build_menu_tree
    self.ds_list = DataSourcesList()
  File "/home/lemrm/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/data_sources_list.py", line 59, in __init__
    self._fill_data_sources_list()
  File "/home/lemrm/.local/share/QGIS/QGIS3/profiles/default/python/plugins/quick_map_services/data_sources_list.py", line 85, in _fill_data_sources_list
    QgsMessageLog.logMessage(error_message, level=QgsMessageLog.CRITICAL)
AttributeError: type object 'QgsMessageLog' has no attribute 'CRITICAL' 

Is there a solution to avoid this behavior?

514ckw4r3 commented 3 years ago

@lemrm, fixed in 0.19.26. Update is available for download.