can't open a specific raster using the API (but drap&drop into the EnMAP-Box is working)
Note: classification1.tif
attached.
from enmapbox.testing import start_app
qgsApp = start_app()
from enmapbox import EnMAPBox
enmapBox = EnMAPBox(None)
#enmapBox.openExampleData()
enmapBox.addSource(r'C:\Users\janzandr\Downloads\classification1.tif', 'classification')
qgsApp.exec_()
C:\miniconda\envs\qgis\python.exe C:/source/arcoop/andreas_rabe/_start_enmapbox.py
<frozen importlib._bootstrap>:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
Application state:
QGIS_PREFIX_PATH env var: C:/miniconda/envs/qgis/Library
Prefix: C:/miniconda/envs/qgis/Library
Plugin Path: C:/miniconda/envs/qgis/Library/plugins
Package Data Path: C:/miniconda/envs/qgis/Library/.
Active Theme Name:
Active Theme Path: C:/miniconda/envs/qgis/Library/./resources/themes\icons/
Default Theme Path: :/images/themes/default/
SVG Search Paths: C:/miniconda/envs/qgis/Library/./svg/
C:\Users\janzandr\AppData\Local\Temp\QGIS-PythonTestConfigPathuxnqehjv\profiles\default/svg/
User DB Path: C:/miniconda/envs/qgis/Library/./resources/qgis.db
Auth DB Path: C:\Users\janzandr\AppData\Local\Temp\QGIS-PythonTestConfigPathuxnqehjv\profiles\default/qgis-auth.db
Processing(2): Problem with SAGA installation: SAGA was not found or is not correctly installed
Providers: DB2, OAPIF, WFS, arcgisfeatureserver, arcgismapserver, delimitedtext, gdal, geonode, gpx, mdal, memory, mesh_memory, mssql, ogr, ows, postgres, postgresraster, spatialite, vectortile, virtual, wcs, wms
load C:\source\QGISPlugIns\enmap-box\enmapbox\enmapboxresources_rc.py
load C:\source\QGISPlugIns\enmap-box\enmapbox\coreapps\enmapboxapplications\ressources_rc.py
load C:\source\QGISPlugIns\enmap-box\enmapbox\externals\qps\qpsresources_rc.py
Load EnMAPBoxApplication(s) from "enmapboxapplications"
Load EnMAPBoxApplication(s) from "eotimeseriesviewerapp"
Load EnMAPBoxApplication(s) from "imagecubeapp"
Load EnMAPBoxApplication(s) from "metadataeditorapp"
Load EnMAPBoxApplication(s) from "reclassifyapp"
Load EnMAPBoxApplication(s) from "vrtbuilderapp"
Load EnMAPBoxApplication(s) from "DASFEnMAPbox"
Load EnMAPBoxApplication(s) from "engeomap"
Load EnMAPBoxApplication(s) from "enpt_app"
Load EnMAPBoxApplication(s) from "ensomap"
Load EnMAPBoxApplication(s) from "hzg_onns"
Load EnMAPBoxApplication(s) from "lmuvegetationapps"
Load EnMAPBoxApplication(s) from "specmixapp"
Load EnMAPBoxApplication(s) from "spectralindexoptimizerapp"
C:\miniconda\envs\qgis\lib\site-packages\osgeo\gdal.py:111: DeprecationWarning: gdal.py was placed in a namespace, it is now available as osgeo.gdal
warn('%s.py was placed in a namespace, it is now available as osgeo.%s' % (module,module),
WFS(1): GetCapabilities failed for url C:\Users\janzandr\Downloads\classification1.tif: Download of capabilities failed: Protocol "" is unknown
DelimitedText(1): Errors in file
DelimitedText(1): File cannot be opened or delimiter parameters are not valid
OGR(1): Cannot open C:\Users\janzandr\Downloads\classification1.tif.()
WFS(1): Download of capabilities failed: Protocol "" is unknown
Comments (6)
-
-
- changed status to open
-
reporter Have you used the code snippet from PyCharm?
-
I run it successfully in PyCharm (develop) and QGIS python shell (master, QGIS 3.16.2 win)
-
@Andreas Janz can we close this issue?
-
reporter - changed status to closed
- Log in to comment
Can’t repeat this error. On my systems I can load the image in the current develop and master branch.