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

Problem publishing multi-level datasets in viewer runnning in Jupyter notebook #1007

Open
forman opened this issue Jun 6, 2024 · 1 comment

Comments

@forman
Copy link
Member

forman commented Jun 6, 2024

Describe the bug

Multi-level datasets from S3 storage added to a xcube Viewer instance in Jupyter cause server 404 errors for many endpoints. The reason is that the default dataset identifiers contain a slash (/) causing invalid URLs not found by xcube Server. This happens although xcube Viewer correctly URL-encodes the dataset identifiers when constructing server request URLs.

A possible quick-fix for the problem is to encode slashes by a different character in the Viewer.add_dataset() method. The solution can be verified by adding a multi-level dataset with an explicit identifier. This works:

viewer.add_dataset(mlds, ds_id="valid_id_without_slash")

To Reproduce

See screenshot below.

Expected behavior

Datasets that have dataset identifers with slashes should work with xcube Server when added to the xcube Viewer instance.

Screenshot

image

Additional context

xcube on DeepESDL platform.

@forman forman changed the title Problem publishing certain datasets in viewer runnning in Jupyter notebook Problem publishing multi-level datasets in viewer runnning in Jupyter notebook Jun 7, 2024
@forman
Copy link
Member Author

forman commented Jun 7, 2024

This is likely a regression that occurs only in Jupyter environments, see

That time, the issue was solved by correctly URL-encoding the dataset identifier URL part.
For some reason, the server URLs are decode twice so that the forward slash again appears and causes the 404.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant