geonode icon indicating copy to clipboard operation
geonode copied to clipboard

The mosaic flag must be false by default when a zip with a Geotiff is uploaded

Open giohappy opened this issue 2 years ago • 1 comments

When a zip containing a Geotiff dataset is uploaded we get the following error:

Could not find any valid Time Regex for the Mosaic files.
Traceback (most recent call last):
  File "/mnt/c/Work/Code/geonode/geonode/upload/views.py", line 705, in view
    resp = _steps[step](req, upload_session)
  File "/mnt/c/Work/Code/geonode/geonode/upload/views.py", line 161, in save_step_view
    import_session, upload = save_step(
  File "/usr/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/mnt/c/Work/Code/geonode/geonode/upload/upload.py", line 427, in save_step
    raise e
  File "/mnt/c/Work/Code/geonode/geonode/upload/upload.py", line 340, in save_step
    target_store, files_to_upload = utils.import_imagemosaic_granules(
  File "/mnt/c/Work/Code/geonode/geonode/upload/utils.py", line 722, in import_imagemosaic_granules
    raise GeneralUploadException(detail=_("Could not find any valid Time Regex for the Mosaic files."))
geonode.upload.api.exceptions.GeneralUploadException: Could not find any valid Time Regex for the Mosaic files.
Internal Server Error: /api/v2/uploads/upload
"POST /api/v2/uploads/upload HTTP/1.1" 500 114

Probably due to the processing of the mosaic field

image

The upload must set the default value for mosaic to False, without expecting the client to set it.

giohappy avatar Apr 13 '22 17:04 giohappy

is this still valid @afabiani?

giohappy avatar May 09 '22 10:05 giohappy