Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show more convenient error if uploaded raster is not readable by gdal #502

Closed
jirik opened this issue Oct 26, 2021 · 0 comments
Closed

Show more convenient error if uploaded raster is not readable by gdal #502

jirik opened this issue Oct 26, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@jirik
Copy link
Member

jirik commented Oct 26, 2021

Example of currently produced async error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/celery/app/trace.py", line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/code/src/layman/make_celery.py", line 36, in __call__
    return self.run(*args, **kwargs)
  File "/code/src/layman/layer/filesystem/tasks.py", line 93, in refresh_gdal
    gdal.assert_valid_raster(input_path)
  File "/code/src/layman/layer/filesystem/gdal.py", line 64, in assert_valid_raster
    color_interp = get_color_interpretations(input_path)
  File "/code/src/layman/layer/filesystem/gdal.py", line 46, in get_color_interpretations
    for band_id in range(1, dataset.RasterCount + 1):
AttributeError: 'NoneType' object has no attribute 'RasterCount'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants