KeyError: 'xUnit' when plotting pixel profiles

Issue #1032 resolved
Andreas Janz created an issue
  • add (new) fraction_polygons_l3.tif testdata to map view: tests/testdata/fraction_polygons_l3.tif
  • plotting a pixel profile gives an error:

    Traceback (most recent call last): File "D:\source\QGISPlugIns\enmap-box\enmapbox\gui\enmapboxgui.py", line 1291, in <lambda> lambda crs, pt, c=canvas: self.setCurrentLocation(SpatialPoint(crs, pt), canvas) File "D:\source\QGISPlugIns\enmap-box\enmapbox\gui\enmapboxgui.py", line 1733, in setCurrentLocation self.loadCurrentMapSpectra(spatialPoint, mapCanvas) File "D:\source\QGISPlugIns\enmap-box\enmapbox\gui\enmapboxgui.py", line 1353, in loadCurrentMapSpectra panel.loadCurrentMapSpectra(spatialPoint, mapCanvas=mapCanvas, runAsync=runAsync) File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\speclib\gui\spectralprofilesources.py", line 2362, in loadCurrentMapSpectra return self.mBridge.loadProfiles(spatialPoint, mapCanvas=mapCanvas, runAsync=runAsync) File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\speclib\gui\spectralprofilesources.py", line 1722, in loadProfiles slw.setCurrentProfiles(features, File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\speclib\gui\spectrallibrarywidget.py", line 579, in setCurrentProfiles plotModel.updatePlot() File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\speclib\gui\spectrallibraryplotwidget.py", line 528, in updatePlot plot_data = self.plotData(feature, fieldIndex, xunit) File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\speclib\gui\spectrallibraryplotwidget.py", line 332, in plotData self.mCACHE_PROFILE_DATA[id_plot_data] = self.modelDataToXUnitPlotData(rawData, xUnit) File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\speclib\gui\spectrallibraryplotwidget.py", line 728, in modelDataToXUnitPlotData func = self.mUnitConverterFunctionModel.convertFunction(modelData['xUnit'], xUnit) KeyError: 'xUnit'

Comments (8)

  1. Andreas Janz reporter

    Hmm, can’t confirm that, still get the same error.

    Git says, that I’m up to date:

    Maybe again a problem with the QPS submodule configuration?

  2. Log in to comment