add data sources from QGIS failes for HE5 subdataset

Issue #1007 invalid
Andreas Janz created an issue

How to reproduce:

  1. Open PRISMA PAN in QGIS:

2. click

Gives error:

An error has occurred while executing Python code: 

RuntimeError: `HDF5:"D:/data/sensors/prisma/PRS_L2D_STD_20201107101404_20201107101408_0001.he5"://HDFEOS/SWATHS/PRS_L2D_PCO/Data_Fields/Cube' does not exist in the file system, and is not recognized as a supported dataset name. 
Traceback (most recent call last):
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasources\manager.py", line 728, in onSyncToQGIS
    self.mDataSourceManager.importQGISLayers()
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasources\manager.py", line 192, in importQGISLayers
    self.addDataSources(DataSourceFactory.create(layers))
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasources\manager.py", line 793, in create
    results.extend(DataSourceFactory.create(s, provider=provider, name=name))
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasources\manager.py", line 877, in create
    results.append(RasterDataSource(dataItem))
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasources\datasources.py", line 210, in __init__
    self.updateNodes()
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\gui\datasources\datasources.py", line 228, in updateNodes
    hasClassInfo = isinstance(ClassificationScheme.fromMapLayer(lyr), ClassificationScheme)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\qgispluginsupport\qps\classification\classificationscheme.py", line 1144, in fromMapLayer
    scheme = ClassificationScheme.fromRasterImage(layer.source())
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\qgispluginsupport\qps\classification\classificationscheme.py", line 1189, in fromRasterImage
    ds = gdalDataset(path)
  File "C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\qgispluginsupport\qps\utils.py", line 809, in gdalDataset
    ds = gdal.Open(dataset, eAccess)
  File "C:\QGIS3.22\apps\Python39\lib\site-packages\osgeo\gdal.py", line 4014, in Open
    return _gdal.Open(*args)
RuntimeError: `HDF5:"D:/data/sensors/prisma/PRS_L2D_STD_20201107101404_20201107101408_0001.he5"://HDFEOS/SWATHS/PRS_L2D_PCO/Data_Fields/Cube' does not exist in the file system, and is not recognized as a supported dataset name.


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.22.3-Białowieża Białowieża, 1628765ec7 

Python Path:
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\ensomap
C:/QGIS3.22/apps/qgis/./python
C:/Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/QGIS3.22/apps/qgis/./python/plugins
C:\QGIS3.22\bin\python39.zip
C:\QGIS3.22\apps\Python39\DLLs
C:\QGIS3.22\apps\Python39\lib
C:\QGIS3.22\bin
C:\Users\Andreas\AppData\Roaming\Python\Python39\site-packages
C:\QGIS3.22\apps\Python39
C:\QGIS3.22\apps\Python39\lib\site-packages
C:\QGIS3.22\apps\Python39\lib\site-packages\GDAL-3.4.1-py3.9-win-amd64.egg
C:\QGIS3.22\apps\Python39\lib\site-packages\win32
C:\QGIS3.22\apps\Python39\lib\site-packages\win32\lib
C:\QGIS3.22\apps\Python39\lib\site-packages\Pythonwin
C:/Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\BitFlagRenderer
C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\BitFlagRenderer\bitflagrenderer
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows
C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\site-packages
C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\qgispluginsupport\qps\pyqtgraph
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\site-packages
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\coreapps
.
C:\Users/Andreas/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\timeseriesviewerplugin
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\timeseriesviewerplugin\eotimeseriesviewer
C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\apps\lmuapps

Comments (5)

  1. Benjamin Jakimow

    Please provide a link to this PRISMA image / a similar smaller test image which causes the same error.

  2. Andreas Janz reporter

    It’s the same L2D product as always (stored on the SAN):
    \data\sensors\prisma\PRS_L2D_STD_20201107101404_20201107101408_0001.he5

  3. Andreas Janz reporter

    Hi @Benjamin Jakimow can you reproduce the error?

    Maybe this was only a problem on my QGIS 3.22 installation. After I reinstalled QGIS it works.

    Same is true for two other bugs.

  4. Log in to comment