EnMAP-Box / enmap-box

EnMAP-Box source code repository. See https://enmap-box.readthedocs.io for documentation
GNU General Public License v3.0
35 stars 16 forks source link

macOS installation problem: installing the plugin starts a new QGIS instance #804

Closed janzandr closed 5 months ago

janzandr commented 6 months ago

Reported by Mariana Altenburg Soppa via email.

Installation was done via mamba:

$ mamba env create -n enpt_full -f https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT/raw/main/tests/gitlab_CI_docker/context/environment_enpt_full.yml

Versions:

importing enpt package also shows a ValueError:

import enpt
Traceback (most recent call last):
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "/Users/msoppa/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/__init__.py", line 37, in <module>
    from .execution.controller import EnPT_Controller
  File "/Users/msoppa/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/execution/controller.py", line 46, in <module>
    from ..io.reader import L1B_Reader
  File "/Users/msoppa/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/io/reader.py", line 36, in <module>
    from scipy.interpolate import interp1d
  File "/Users/msoppa/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/scipy/__init__.py", line 67, in <module>
    from scipy._lib import _pep440
  File "/Users/msoppa/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/scipy/_lib/__init__.py", line 12, in <module>
    from scipy._lib._testutils import PytestTester
  File "/Users/msoppa/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/__init__.py", line 38, in __wrapping_ee_import__
    _module_ = __builtin_import__(name, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/scipy/_lib/_testutils.py", line 21, in <module>
    _tags = list(sys_tags())
            ^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/packaging/tags.py", line 543, in sys_tags
    yield from cpython_tags(warn=warn)
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/packaging/tags.py", line 212, in cpython_tags
    platforms = list(platforms or platform_tags())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/packaging/tags.py", line 412, in mac_platforms
    version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
janzandr commented 6 months ago

@danschef please have a look at what could cause the ValueError, when importing enpt under macOS.

@jakimowb can you please have a look at the installation problem. The problem sounds familiar. We had a similar problem in the past, where the installation starts new QGIS instances.

danschef commented 6 months ago

According to the above traceback, the ValueError is raised when EnPT tries to import from scipy.interpolate import interp1d and within there, at from scipy._lib._testutils import PytestTester. I just installed the latest scipy (v1.12.0) on Linux - both imports are working properly. However, I don´t have a Mac, so I cannot try it there. @jakimowb Could you maybe try this on a Mac?

@msoppa1 Could you check which version of scipy is installed on your machine (conda list scipy). You could try to downgrade scipy by running conda install "scipy<1.12.0". If that helps, I could easily add a version pinning to EnPT to make it work for now.

However, since interp1d does not receive updates anymore, I need to replace it in EnPT anyway. I will look into this as soon as possible.

msoppa1 commented 6 months ago

I downgraded scipy and upgraded EnMAP-Box to version 3.13.3.

Now I can start the EnMAP-Box without problem, but I is still get error in EnPT:

QGIS-Version: 3.34.3-Prizren

Qt-Version: 5.15.8

Python-Version: 3.11.7

GDAL-Version: 3.8.3

GEOS-Version: 3.12.1-CAPI-1.18.1

PROJ-Version: Rel. 9.3.1, December 1st, 2023

PDAL-Version: 2.6.2 (git-version: Release)

Algorithmus gestartet um: 2024-02-14T09:13:35

Algorithmus EnPT - EnMAP Processing Tool (v0.8.4) startet…

Eingabeparameter:

{ 'CPUs' : 12, 'auto_download_ecmwf' : True, 'average_elevation' : 0, 'blocksize' : 100, 'deadpix_P_algorithm' : 1, 'deadpix_P_interp_spatial' : 0, 'deadpix_P_interp_spectral' : 0, 'disable_progress_bars' : True, 'drop_bad_bands' : True, 'enable_ac' : True, 'json_config' : '', 'mode_ac' : 0, 'n_lines_to_append' : None, 'ortho_resampAlg' : 2, 'output_dir' : '/Users/msoppa/EnPT/Output/Trasimeno', 'output_format' : 0, 'output_interleave' : 2, 'output_nodata_value' : -32768, 'path_dem' : None, 'path_earthSunDist' : '', 'path_l1b_enmap_image' : '/Volumes/AWIMari/EnMAP_v4_paper/Level1/UTM_bilinear/Trasimeno/20221005/ENMAP01-____L1B-DT0000004145_20221005T104059Z_002_V010400_20231108T090623Z.ZIP', 'path_l1b_enmap_image_gapfill' : '', 'path_reference_image' : None, 'path_solar_irr' : '', 'polymer_additional_results' : True, 'polymer_root' : '', 'run_deadpix_P' : False, 'scale_factor_boa_ref' : 10000, 'scale_factor_toa_ref' : 10000, 'target_epsg' : None, 'target_projection_type' : 0, 'threads' : -1, 'vswir_overlap_algorithm' : 3, 'working_dir' : '' }

Calling EnPT with the following command: enpt --CPUs 12 --auto_download_ecmwf True --average_elevation 0 --blocksize 100 --deadpix_P_algorithm spatial --deadpix_P_interp_spatial linear --deadpix_P_interp_spectral linear --disable_progress_bars True --drop_bad_bands True --enable_ac True --mode_ac land --ortho_resampAlg gauss --output_dir /Users/msoppa/EnPT/Output/Trasimeno --output_format GTiff --output_interleave pixel --output_nodata_value -32768 --path_l1b_enmap_image /Volumes/AWIMari/EnMAP_v4_paper/Level1/UTM_bilinear/Trasimeno/20221005/ENMAP01-____L1B-DT0000004145_20221005T104059Z_002_V010400_20231108T090623Z.ZIP --polymer_additional_results True --run_deadpix_P False --scale_factor_boa_ref 10000 --scale_factor_toa_ref 10000 --target_projection_type UTM --threads -1 --vswir_overlap_algorithm swir_only

The log messages of the EnMAP processing tool are written to the *.log file in the specified output folder.

/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/cli.py:192: RuntimeWarning: No digital elevation model provided. Note that this may cause uncertainties, e.g., in the atmospheric correction and the orthorectification.

return EnPTConfig(**parsedArgs_to_user_opts(cli_args))

2024/02/14 09:13:39: Reading metadata for VNIR detector...

2024/02/14 09:13:39: Reading metadata for SWIR detector...

2024/02/14 09:13:39: Reading image masks in VNIR sensor geometry.

2024/02/14 09:13:43: Converting DN values to radiance [mW/m^2/sr/nm] for VNIR detector...

2024/02/14 09:13:45: Converting DN values to radiance [mW/m^2/sr/nm] for SWIR detector...

2024/02/14 09:13:47: Computing SNR from VNIR TOA radiance.

2024/02/14 09:13:57: Computing SNR from SWIR TOA radiance.

2024/02/14 09:14:03: Computing VNIR geolayer...

2024/02/14 09:14:04: Computing SWIR geolayer...

2024/02/14 09:18:35: No DEM for the VNIR detector provided. Falling back to an average elevation of 0 meters.

2024/02/14 09:18:35: No DEM for the SWIR detector provided. Falling back to an average elevation of 0 meters.

2024/02/14 09:18:39: Transforming the 'mask_landwater' attribute from VNIR to SWIR sensor geometry.

SUBCALL CMD: gdalwarp '/var/folders/8p/k4kxdfd57957skfpv66cd_g92t8kbn/T/tmpuj6o55tt/data.vrt' '/var/folders/8p/k4kxdfd57957skfpv66cd_g92t8kbn/T/tmpuj6o55tt/data_out.bsq' -geoloc -t_srs EPSG:32633 -srcnodata 0 -r near -of ENVI -dstnodata none -et 0 -overwrite -te 246949.54471345508 4768858.638618446 284372.9886697792 4805076.652045342

SUBCALL OUT: b''

SUBCALL ERR: b"dyld[5818]: Library not loaded: /usr/local/opt/hdf5/lib/libhdf5.200.dylib\n Referenced from:

/usr/local/Cellar/gdal/3.5.2/bin/gdalwarp\n Reason: tried: '/usr/local/opt/hdf5/lib/libhdf5.200.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/hdf5/lib/libhdf5.200.dylib' (no such file), '/usr/local/opt/hdf5/lib/libhdf5.200.dylib' (no such file), '/usr/local/lib/libhdf5.200.dylib' (no such file), '/usr/lib/libhdf5.200.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/hdf5/1.14.3/lib/libhdf5.200.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/hdf5/1.14.3/lib/libhdf5.200.dylib' (no such file), '/usr/local/Cellar/hdf5/1.14.3/lib/libhdf5.200.dylib' (no such file), '/usr/local/lib/libhdf5.200.dylib' (no such file), '/usr/lib/libhdf5.200.dylib' (no such file, not in dyld cache)\n" Traceback (most recent call last): File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/bin/enpt", line 10, in sys.exit(main()) ^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/cli.py", line 229, in main parsed_args.func(get_config(parsed_args)) File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/cli.py", line 197, in run_job CTR.run_all_processors() File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/execution/controller.py", line 184, in run_all_processors self.run_atmospheric_correction() File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/execution/controller.py", line 152, in run_atmospheric_correction self.L1_obj.run_AC() File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.py", line 871, in run_AC AC.run_ac(self) File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/processors/atmospheric_correction/atmospheric_correction.py", line 295, in run_ac enmap_ImageL1.set_SWIRattr_with_transformedVNIRattr('mask_landwater') File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.py", line 863, in set_SWIRattr_with_transformedVNIRattr attr_transformed = self.transform_vnir_to_swir_raster(array_vnirsensorgeo=np.array(vnir_rasterAttr), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.py", line 815, in transform_vnir_to_swir_raster return self.swir.transform_vnir_to_swir_raster(array_vnirsensorgeo=array_vnirsensorgeo, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.py", line 528, in transform_vnir_to_swir_raster return self._transform_raster_geometry_from_other_detector( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.py", line 440, in _transform_raster_geometry_from_other_detector return VS_SGT.transform_sensorgeo_VNIR_to_SWIR(array) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/processors/spatial_transform/spatial_transform.py", line 207, in transform_sensorgeo_VNIR_to_SWIR return self._transform_sensorgeo(data_vnirsensorgeo, inputgeo='vnir') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/processors/spatial_transform/spatial_transform.py", line 260, in _transform_sensorgeo gA_mapgeo = GeoArray(*GT_src.to_map_geometry(data2transform, tgt_prj=src['prj'])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/enpt/processors/spatial_transform/spatial_transform.py", line 96, in to_map_geometry super(Geometry_Transformer, self).to_map_geometry(data_sensorgeo[:], File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/sensormapgeo/transformer_2d.py", line 376, in to_map_geometry self.area_definition = self.compute_areadefinition_sensor2map( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/sensormapgeo/transformer_2d.py", line 239, in compute_areadefinition_sensor2map ds_out = raiseErr_if_empty(gdal.Open(path_data_out)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/msoppa/mambaforge/envs/enpt_full_Feb24/lib/python3.11/site-packages/osgeo/gdal.py", line 5990, in Open return _gdal.Open(*args) ^^^^^^^^^^^^^^^^^ RuntimeError: /var/folders/8p/k4kxdfd57957skfpv66cd_g92t8kbn/T/tmpuj6o55tt/data_out.bsq: No such file or directory ============================================================ An exception occurred. Processing failed. The output folder '/Users/msoppa/EnPT/Output/Trasimeno' contains: ENMAP01-____L1B-DT0000004145_20221005T104059Z_002_V010400_20231108T090623Z.log No output raster was written. Execution completed in 306.73 Sekunden (5 Minuten 7 Sekunden) Ergebnisse: {'success': False} Lade Ergebnis Layer Algorithmus 'EnPT - EnMAP Processing Tool (v0.8.4)' beendet On 13.02.24 17:19, Daniel Scheffler wrote: > > According to the above traceback, the |ValueError| is raised when EnPT > tries to import from |scipy.interpolate import interp1d| and within > there, at |from scipy._lib._testutils import PytestTester|. I just > installed the latest scipy (v1.12.0) on Linux - both imports are > working properly. However, I don´t have a Mac, so I cannot try it > there. @jakimowb Could you maybe try > this on a Mac? > > @msoppa1 Could you check which version of > scipy is installed on your machine (|conda list scipy|). You could try > to downgrade scipy by running |conda install "scipy<1.12.0"|. > > However, since |interp1d| does not receive updates anymore, I need to > replace it in EnPT anyway. I will look into this as soon as possible. > > — Reply to this email directly, view it on GitHub > , > or unsubscribe > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > --------------GMOm6gt3Ig0m94hiOCf1SiOK Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I downgraded scipy and upgraded EnMAP-Box to version 3.13.3.=C2=A0=

Now I can start the EnMAP-Box without problem, but I is still get = error in EnPT:

QGIS-Version: 3.34.3-Prizren

Qt-Version: 5.15.8

Python-Version: 3.11.7

GDAL-Version: 3.8.3

GEOS-Version: 3.12.1-CAPI-1.18.1

=

PROJ-Version: Rel. 9.3.1, December 1st, 202= 3

PDAL-Version: 2.6.2 (git-version: Release)<= /span>

Algorithmus gestartet um: 20= 24-02-14T09:13:35

Algorithmus EnPT - EnMAP Processing Tool = (v0.8.4) startet=E2=80=A6

Eingabeparameter:

{ 'CPUs' : 12, 'auto_download_ecmwf' = : True, 'average_elevation' : 0, 'blocksize' : 100, 'deadpix_P_algorithm'= : 1, 'deadpix_P_interp_spatial' : 0, 'deadpix_P_interp_spectral' : 0, 'd= isable_progress_bars' : True, 'drop_bad_bands' : True, 'enable_ac' : True= , 'json_config' : '', 'mode_ac' : 0, 'n_lines_to_append' : None, 'ortho_r= esampAlg' : 2, 'output_dir' : '/Users/msoppa/EnPT/Output/Trasimeno', 'out= put_format' : 0, 'output_interleave' : 2, 'output_nodata_value' : -32768,= 'path_dem' : None, 'path_earthSunDist' : '', 'path_l1b_enmap_image' : '/= Volumes/AWIMari/EnMAP_v4_paper/Level1/UTM_bilinear/Trasimeno/20221005/ENM= AP01-____L1B-DT0000004145_20221005T104059Z_002_V010400_20231108T090623Z.Z= IP', 'path_l1b_enmap_image_gapfill' : '', 'path_reference_image' : None, = 'path_solar_irr' : '', 'polymer_additional_results' : True, 'polymer_root= ' : '', 'run_deadpix_P' : False, 'scale_factor_boa_ref' : 10000, 'scale_f= actor_toa_ref' : 10000, 'target_epsg' : None, 'target_projection_type' : = 0, 'threads' : -1, 'vswir_overlap_algorithm' : 3, 'working_dir' : '' }

Calling EnPT with the following command: enpt --CPUs 12 --auto_download_ecmwf True --average_elevation 0 --blocksi= ze 100 --deadpix_P_algorithm spatial --deadpix_P_interp_spatial linear --= deadpix_P_interp_spectral linear --disable_progress_bars True --drop_bad_= bands True --enable_ac True --mode_ac land --ortho_resampAlg gauss --outp= ut_dir /Users/msoppa/EnPT/Output/Trasimeno --output_format GTiff --output= _interleave pixel --output_nodata_value -32768 --path_l1b_enmap_image /Vo= lumes/AWIMari/EnMAP_v4_paper/Level1/UTM_bilinear/Trasimeno/20221005/ENMAP= 01-____L1B-DT0000004145_20221005T104059Z_002_V010400_20231108T090623Z.ZIP= --polymer_additional_results True --run_deadpix_P False --scale_factor_b= oa_ref 10000 --scale_factor_toa_ref 10000 --target_projection_type UTM --= threads -1 --vswir_overlap_algorithm swir_only

The log messages of the EnMA= P processing tool are written to the *.log file in the specified output f= older.

/Users/msoppa/mambaforge/envs/enpt_full_Feb= 24/lib/python3.11/site-packages/enpt/cli.py:192: RuntimeWarning: No digit= al elevation model provided. Note that this may cause uncertainties, e.g.= , in the atmospheric correction and the orthorectification.

return EnPTConfig(**parsedArgs_to_user_opts= (cli_args))

2024/02/14 09:13:39: Reading= metadata for VNIR detector...

2024/02/14 09:13:39: Reading= metadata for SWIR detector...

2024/02/14 09:13:39: Reading= image masks in VNIR sensor geometry.

2024/02/14 09:13:43: Convert= ing DN values to radiance [mW/m^2/sr/nm] for VNIR detector...

2024/02/14 09:13:45: Convert= ing DN values to radiance [mW/m^2/sr/nm] for SWIR detector...

2024/02/14 09:13:47: Computi= ng SNR from VNIR TOA radiance.

2024/02/14 09:13:57: Computi= ng SNR from SWIR TOA radiance.

2024/02/14 09:14:03: Computi= ng VNIR geolayer...

2024/02/14 09:14:04: Computi= ng SWIR geolayer...

2024/02/14 09:18:35: No DEM = for the VNIR detector provided. Falling back to an average elevation of 0= meters.

2024/02/14 09:18:35: No DEM = for the SWIR detector provided. Falling back to an average elevation of 0= meters.

2024/02/14 09:18:39: Transfo= rming the 'mask_landwater' attribute from VNIR to SWIR sensor geometry.

SUBCALL CMD: gdalwarp '/var/= folders/8p/k4kxdfd57957skfpv66cd_g92t8kbn/T/tmpuj6o55tt/data.vrt' '/var/f= olders/8p/k4kxdfd57957skfpv66cd_g92t8kbn/T/tmpuj6o55tt/data_out.bsq' -geo= loc -t_srs EPSG:32633 -srcnodata 0 -r near -of ENVI -dstnodata none -et 0= -overwrite -te 246949.54471345508 4768858.638618446 284372.9886697792 48= 05076.652045342

SUBCALL OUT: b''

SUBCALL ERR: b"dyld[5818]: L= ibrary not loaded: /usr/local/opt/hdf5/lib/libhdf5.200.dylib\n Referenced= from: <E85F6702-C6CB-3F88-9282-94C81DF9503B> /usr/local/Cellar/gda= l/3.5.2/bin/gdalwarp\n Reason: tried: '/usr/local/opt/hdf5/lib/libhdf5.20= 0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/= opt/hdf5/lib/libhdf5.200.dylib' (no such file), '/usr/local/opt/hdf5/lib/= libhdf5.200.dylib' (no such file), '/usr/local/lib/libhdf5.200.dylib' (no= such file), '/usr/lib/libhdf5.200.dylib' (no such file, not in dyld cach= e), '/usr/local/Cellar/hdf5/1.14.3/lib/libhdf5.200.dylib' (no such file),= '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/hdf5/1.14.3/lib/l= ibhdf5.200.dylib' (no such file), '/usr/local/Cellar/hdf5/1.14.3/lib/libh= df5.200.dylib' (no such file), '/usr/local/lib/libhdf5.200.dylib' (no suc= h file), '/usr/lib/libhdf5.200.dylib' (no such file, not in dyld cache)\n= "

Traceback (most recent call last):

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/bin/enpt", line 10, in <module>

sys.exit(main())

^^^^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/cli.py", line 229, in main

parsed_args.func(get_config(parsed_args))

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/cli.py", line 197, in run_job<= /span>

CTR.run_all_processors()

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/execution/controller.py", line= 184, in run_all_processors

self.run_atmospheric_correction()

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/execution/controller.py", line= 152, in run_atmospheric_correction

self.L1_obj.run_AC()

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.= py", line 871, in run_AC

AC.run_ac(self)

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/processors/atmospheric_correct= ion/atmospheric_correction.py", line 295, in run_ac

enmap_ImageL1.set_SWIRattr_with_transformed= VNIRattr('mask_landwater')

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.= py", line 863, in set_SWIRattr_with_transformedVNIRattr

attr_transformed =3D self.transform_vnir_to= _swir_raster(array_vnirsensorgeo=3Dnp.array(vnir_rasterAttr),

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.= py", line 815, in transform_vnir_to_swir_raster

return self.swir.transform_vnir_to_swir_ras= ter(array_vnirsensorgeo=3Darray_vnirsensorgeo,

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.= py", line 528, in transform_vnir_to_swir_raster

return self._transform_raster_geometry_from= _other_detector(

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/model/images/images_sensorgeo.= py", line 440, in _transform_raster_geometry_from_other_detector

return VS_SGT.transform_sensorgeo_VNIR_to_S= WIR(array)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/processors/spatial_transform/s= patial_transform.py", line 207, in transform_sensorgeo_VNIR_to_SWIR

return self._transform_sensorgeo(data_vnirs= ensorgeo, inputgeo=3D'vnir')

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^^^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/processors/spatial_transform/s= patial_transform.py", line 260, in _transform_sensorgeo

gA_mapgeo =3D GeoArray(*GT_src.to_map_geome= try(data2transform, tgt_prj=3Dsrc['prj']))

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/enpt/processors/spatial_transform/s= patial_transform.py", line 96, in to_map_geometry

super(Geometry_Transformer, self).to_map_ge= ometry(data_sensorgeo[:],

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/sensormapgeo/transformer_2d.py", li= ne 376, in to_map_geometry

self.area_definition =3D self.compute_aread= efinition_sensor2map(

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/sensormapgeo/transformer_2d.py", li= ne 239, in compute_areadefinition_sensor2map

ds_out =3D raiseErr_if_empty(gdal.Open(path= _data_out))

^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/msoppa/mambaforge/envs/enpt_fu= ll_Feb24/lib/python3.11/site-packages/osgeo/gdal.py", line 5990, in Open<= /span>

return _gdal.Open(*args)

^^^^^^^^^^^^^^^^^

RuntimeError: /var/folders/8p/k4kxdfd57957s= kfpv66cd_g92t8kbn/T/tmpuj6o55tt/data_out.bsq: No such file or directory

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D An exception occurred. Processing failed.

The output folder '/Users/ms= oppa/EnPT/Output/Trasimeno' contains:

ENMAP01-____L1B-DT0000004145_20221005= T104059Z_002_V010400_20231108T090623Z.log

No output raster was written.

Execution completed in 306.7= 3 Sekunden (5 Minuten 7 Sekunden)

Ergebnisse:

{'success': False}

Lade Ergebnis Layer

Algorithmus 'EnPT - EnMAP Pr= ocessing Tool (v0.8.4)' beendet

<= /p>

On 13.02.24 17:19, Daniel Scheffler wrote:

According to the above traceback, the ValueError is raised when EnPT tries t= o import from scipy.interpolate import interp1d and = within there, at from scipy._lib._testutils import PytestTeste= r. I just installed the latest scipy (v1.12.0) on Linux - both imp= orts are working properly. However, I don=C2=B4t have a Mac, so I cannot = try it there. Could you maybe try this on a Mac?

Could you check which version of scipy is installed on your machin= e (conda list scipy). You could try to do= wngrade scipy by running conda install "scipy<1.12.0".

However, since interp1d= does not receive updates anymore, I need to replace it in EnPT an= yway. I will look into this as soon as possible.

=E2=80=94 Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.3D""Message ID: <EnMAP-Box/enmap-box/issu= es/804/1941934729@github.com>

--------------GMOm6gt3Ig0m94hiOCf1SiOK--
danschef commented 6 months ago

So which version of scipy is now installed?

The above traceback from EnPT contains some lines of code which are not at the current version. For example, I recently revised the package sensormapgeo, it should now be at version 1.0.0 but the code called above is older. Also, it looks like you are using an old version of GDAL (3.5.*, the latest version of EnPT needs 3.8) and there might probably be something wrong with your environment because somehow there seems to be a link to /usr/local/Cellar/gdal/3.5.2/bin/gdalwarp which is not loaded from your environment (/Users/msoppa/mambaforge/envs/enpt_full_Feb24/) at all.

How did you install EnPT? I would strongly recommend to setup the environment from scratch and not update an existing environment. Also make sure conda is up-to-date (mamba update -n base --all) before creating the environment.

danschef commented 6 months ago

Note that the update of sensormapgeo was last week, so maybe re-creating the environment already fixes it. It should install enpt 0.20.0, enpt_enmapboxapp 0.8.5, sensormapgeo 1.0.0, arosics 1.10.2, gdal 3.8.*, and python 3.11.

msoppa1 commented 6 months ago

I will do as soon as possible, tks!

On 14.02.24 10:35, Daniel Scheffler wrote:

Note that the update of sensormapgeo was last week, so maybe re-creating the environment already fixes it. It should install enpt 0.20.0, enpt_enmapboxapp 0.8.5, sensormapgeo 1.0.0, arosics 1.10.2, gdal 3.8.*, and python 3.11.

— Reply to this email directly, view it on GitHub https://github.com/EnMAP-Box/enmap-box/issues/804#issuecomment-1943387910, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEPBGJPNPDZGL5GXIH2NU5LYTSAOXAVCNFSM6AAAAABDELB6SCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBTGM4DOOJRGA. You are receiving this because you were mentioned.Message ID: @.***>

--------------sS8lKuI2RNe7Ao9mwkeeGZ36 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit

<!DOCTYPE html>

I will do as soon as possible, tks!

On 14.02.24 10:35, Daniel Scheffler wrote:

Note that the update of sensormapgeo was last week, so maybe re-creating the environment already fixes it. It should install enpt 0.20.0, enpt_enmapboxapp 0.8.5, sensormapgeo 1.0.0, arosics 1.10.2, gdal 3.8.*, and python 3.11.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: <EnMAP-Box/enmap-box/issues/804/1943387910@github.com>

--------------sS8lKuI2RNe7Ao9mwkeeGZ36--

jakimowb commented 6 months ago

According to the above traceback, the ValueError is raised when EnPT tries to import from scipy.interpolate import interp1d and within there, at from scipy._lib._testutils import PytestTester.

@danschef indeed, from scipy.interpolate import interp1d causes QGIS to restart if installed with conda on macOS. This also happens in a clean conda environment with QGIS + scipy only (no other QGIS plugins).

danschef commented 6 months ago

Then I will just add an upper-version pinning for scipy for now and replace interp1d in the next release.

jakimowb commented 6 months ago

relates to https://github.com/conda-forge/qgis-feedstock/issues/405

jakimowb commented 6 months ago

A workaround until https://github.com/conda-forge/qgis-feedstock/issues/405 is closed can be to ensure that the scipy version is < 1.12:

conda install "scipy<1.12"

@msoppa1 please let me know if this helped in your case

jakimowb commented 6 months ago

workaround provided with #814

msoppa1 commented 5 months ago

Danke,

Letzte Woche war ich krank und habe nicht viel geschafft, aber jetzt fängt am Mittwoch eine Hiwi an, die an Polymer/Acwater arbeiten wird.

VG

Mariana

On 22.02.24 16:17, jakimowb wrote:

workaround provided with #814 https://github.com/EnMAP-Box/enmap-box/pull/814

— Reply to this email directly, view it on GitHub https://github.com/EnMAP-Box/enmap-box/issues/804#issuecomment-1959668111, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEPBGJJDS6L7M3VYUFBI3VTYU5OR7AVCNFSM6AAAAABDELB6SCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJZGY3DQMJRGE. You are receiving this because you were mentioned.Message ID: @.***>

--------------lRinDEJRWJT1MY0m2l0Uj0hi Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit

<!DOCTYPE html>

Danke,


Letzte Woche war ich krank und habe nicht viel geschafft, aber jetzt fängt am Mittwoch eine Hiwi an, die an Polymer/Acwater arbeiten wird.


VG

Mariana

On 22.02.24 16:17, jakimowb wrote:

workaround provided with #814


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: <EnMAP-Box/enmap-box/issues/804/1959668111@github.com>

--------------lRinDEJRWJT1MY0m2l0Uj0hi--

danschef commented 5 months ago

EnPT v0.20.1 (just released) replaces scipy.interpolate.interp1d. A GUI update (enpt_enmapboxapp) will be released soon. This should hopefully fix the EnPT-related part of this issue.