Unexpected error - Regression Performance

Issue #1428 invalid
Former user created an issue

Used sample data to create a fraction map (using regression unmixing) and a reference map from sample data. Used these as input to Regression Performance tool and received an exception: unexpected error. Attaching process log.

Comments (4)

  1. Andreas Rabe

    Here is the full content of the attached file:

    QGIS version: 3.16.8-Hannover
    QGIS code revision: 8c50902e
    Qt version: 5.15.2
    GDAL version: 3.3.0
    GEOS version: 3.9.1-CAPI-1.14.2
    PROJ version: Rel. 8.0.1, March 5th, 2021
    Processing algorithm
    Algorithm 'Regression Performance' starting
    Input parameters:
    { 'invertMask' : False, 'mask' : None, 'outReport' : 'C:/Users/User/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/outputs/outReport.html', 'prediction' : 'E:/00_Masters/ARS/Hyperspectral Spectroscopy/output/fraction_mean_mean.bsq', 'reference' : 'E:/00_Masters/ARS/Hyperspectral Spectroscopy/output/validation/fraction_level1_reference.bsq' }
    
    {'invertMask': False, 'mask': None, 'outReport': 'C:/Users/User/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/outputs/outReport.html', 'prediction': 'fraction_mean_mean_bsq_8e115866_f910_4d51_8769_7f81273caef5', 'reference': 'fraction_level1_reference_bsq_323495e6_8640_4fb3_8f0e_bc27ff6d21c0'}
    Traceback (most recent call last):
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 155, in processAlgorithm
    result = self.processAlgorithm_()
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 1524, in processAlgorithm_
    performance.report().saveHTML(filename=filename, open=True)
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 6028, in report
    report.append(ReportPlot(fig)) # , caption=fittedLineText))
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\report.py", line 176, in __init__
    array = fig2rgb_array()
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\report.py", line 170, in fig2rgb_array
    figure.canvas.draw()
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\backends\backend_agg.py", line 407, in draw
    self.figure.draw(self.renderer)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\figure.py", line 1863, in draw
    mimage._draw_list_compositing_images(
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\image.py", line 131, in _draw_list_compositing_images
    a.draw(renderer)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\cbook\deprecation.py", line 411, in wrapper
    return func(*inner_args, **inner_kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\axes\_base.py", line 2747, in draw
    mimage._draw_list_compositing_images(renderer, self, artists)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\image.py", line 131, in _draw_list_compositing_images
    a.draw(renderer)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\collections.py", line 931, in draw
    Collection.draw(self, renderer)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\collections.py", line 406, in draw
    renderer.draw_path_collection(
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\backends\backend_agg.py", line 172, in draw_path_collection
    return self._renderer.draw_path_collection(
    ValueError: Expected 2-dimensional array, got 1
    
    Traceback (most recent call last):
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 155, in processAlgorithm
    result = self.processAlgorithm_()
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 1524, in processAlgorithm_
    performance.report().saveHTML(filename=filename, open=True)
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 6028, in report
    report.append(ReportPlot(fig)) # , caption=fittedLineText))
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\report.py", line 176, in __init__
    array = fig2rgb_array()
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\report.py", line 170, in fig2rgb_array
    figure.canvas.draw()
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\backends\backend_agg.py", line 407, in draw
    self.figure.draw(self.renderer)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\figure.py", line 1863, in draw
    mimage._draw_list_compositing_images(
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\image.py", line 131, in _draw_list_compositing_images
    a.draw(renderer)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\cbook\deprecation.py", line 411, in wrapper
    return func(*inner_args, **inner_kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\axes\_base.py", line 2747, in draw
    mimage._draw_list_compositing_images(renderer, self, artists)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\image.py", line 131, in _draw_list_compositing_images
    a.draw(renderer)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\collections.py", line 931, in draw
    Collection.draw(self, renderer)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\artist.py", line 41, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\collections.py", line 406, in draw
    renderer.draw_path_collection(
    File "D:\Programs\qgis3\apps\Python39\lib\site-packages\matplotlib\backends\backend_agg.py", line 172, in draw_path_collection
    return self._renderer.draw_path_collection(
    ValueError: Expected 2-dimensional array, got 1
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
    File "C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 169, in processAlgorithm
    raise Exception('unexpected error')
    Exception: unexpected error
    
    Execution failed after 0.48 seconds
    
    Loading resulting layers
    Algorithm 'Regression Performance' finished
    

  2. Andreas Rabe

    Please install QGIS 3.26+ and EnMAP-Box v3.11.

    The error above is known and already fixed in the current EnMAP-Box version.

  3. Log in to comment