GDAL 3.9.0 gives error when running gdal_warp inside the curvi_to_recto function

Issue #13 resolved
bert.coerver created an issue

versions below 3.9.0 works without problem. Error message:

(RuntimeError: Failed to parse '45.0' as decimal integer: pattern '45.0' does not match to the end).
2024-06-25 12:09:04,560     ERROR:                 
Traceback (most recent call last):
  File "/Users/hmcoerver/Library/Mobile Documents/com~apple~CloudDocs/GitHub/pywapor/pywapor/collect/downloader.py", line 129, in collect_sources
    x = dler(**args)
        ^^^^^^^^^^^^
  File "/Users/hmcoerver/Library/Mobile Documents/com~apple~CloudDocs/GitHub/pywapor/pywapor/collect/product/VIIRSL1.py", line 536, in download
    _ = curvi_to_recto(lats_file, lons_file, {"bt": unproj_fn}, proj_fn, warp_kwargs = warp_kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hmcoerver/Library/Mobile Documents/com~apple~CloudDocs/GitHub/pywapor/pywapor/general/curvilinear.py", line 62, in curvi_to_recto
    options = gdal.WarpOptions(
              ^^^^^^^^^^^^^^^^^
  File "/Users/hmcoerver/miniconda3/envs/pywapor_3/lib/python3.12/site-packages/osgeo/gdal.py", line 1115, in WarpOptions
    return (GDALWarpAppOptions(new_options), callback, callback_data)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hmcoerver/miniconda3/envs/pywapor_3/lib/python3.12/site-packages/osgeo/gdal.py", line 8987, in init
    _gdal.GDALWarpAppOptions_swiginit(self, _gdal.new_GDALWarpAppOptions(*args))
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Failed to parse '45.0' as decimal integer: pattern '45.0' does not match to the end

Comments (3)

  1. bert.coerver reporter

    Fixed for now in pywapor 3.5.6 by requiring a lower gdal version, but needs better fix.

  2. Log in to comment