RasterMath Error (V 3.9)

Issue #745 invalid
Henrike Dierkes created an issue

When opening RasterMath Algo → Error

ValueError: unsupported wavelength units: μm 
Traceback (most recent call last):
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\gui\ProcessingToolbox.py", line 269, in executeAlgorithm
    dlg = AlgorithmDialog(alg, self.in_place_mode, iface.mainWindow())
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", line 67, in __init__
    self.setMainWidget(self.getParametersPanel(alg, self))
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", line 91, in getParametersPanel
    panel = ParametersPanel(parent, alg, self.in_place, self.active_layer)
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\gui\ParametersPanel.py", line 71, in __init__
    self.initWidgets()
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\gui\ParametersPanel.py", line 118, in initWidgets
    wrapper = WidgetWrapperFactory.create_wrapper(param, self.parent())
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\gui\wrappers.py", line 1845, in create_wrapper
    return WidgetWrapperFactory.create_wrapper_from_metadata(param, dialog, row, col)
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\gui\wrappers.py", line 1880, in create_wrapper_from_metadata
    wrapper = wrapper(param, dialog, row, col, **params)
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\gui\wrappers.py", line 154, in __init__
    self.widget = self.createWidget(**kwargs)
  File "C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\parameter\processingparameterrastermathcodeeditwidget.py", line 470, in createWidget
    return ProcessingParameterRasterMathCodeEdit()
  File "C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\parameter\processingparameterrastermathcodeeditwidget.py", line 42, in __init__
    self.updateSources()
  File "C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\parameter\processingparameterrastermathcodeeditwidget.py", line 411, in updateSources
    if reader.isSpectralRasterLayer():
  File "C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\rasterreader.py", line 266, in isSpectralRasterLayer
    return self.wavelength(1) is not None
  File "C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages\typeguard\__init__.py", line 903, in wrapper
    retval = func(*args, **kwargs)
  File "C:\Users/PC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxprocessing\rasterreader.py", line 328, in wavelength
    raise ValueError(f'unsupported wavelength units: {wavelength_units}')
ValueError: unsupported wavelength units: μm

Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS-Version: 3.20.2-Odense Odense, 9f59a156

Comments (3)

  1. Andreas Janz

    Hi Henrike,
    I need to know which files are opened in the EnMAP-Box, when you start RasterMath. Try to break it down to a single raster file, that causes the problem.
    Now, I would need that file to reproduce the error.

  2. Henrike Dierkes reporter

    I tried it with different files, the example data and my own files.

    But I checked it again. Now it works. I couldn’t figure out, what could have caused the error. Will check it again

  3. Log in to comment