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

Character %2F is automatically converted to / in URL param #70

Open
severo opened this issue Jun 5, 2023 · 1 comment · May be fixed by #71
Open

Character %2F is automatically converted to / in URL param #70

severo opened this issue Jun 5, 2023 · 1 comment · May be fixed by #71

Comments

@severo
Copy link

severo commented Jun 5, 2023

When passing a parquet URL that contains the character %2F, it seems that the character is considered as /, which convert the original URL to a different one.

See, for example, the file: https://huggingface.co/datasets/squad/resolve/refs%2Fconvert%2Fparquet/plain_text/squad-train.parquet.

The app gives the following error:

Error

Traceback (most recent call last):
  File "/lib/python311.zip/_pyodide/_base.py", line 540, in eval_code_async
    await CodeRunner(
  File "/lib/python311.zip/_pyodide/_base.py", line 365, in run_async
    await coroutine
  File "<exec>", line 110, in <module>
  File "/lib/python311.zip/pyodide/http.py", line 201, in bytes
    self._raise_if_failed()
  File "/lib/python311.zip/pyodide/http.py", line 125, in _raise_if_failed
    raise OSError(
OSError: Request for https://huggingface.co/datasets/squad/resolve/refs/convert/parquet/plain_text/squad-train.parquet failed with status 404: Not Found

in these two cases:

cc @julien-c

severo added a commit to severo/datasette-lite that referenced this issue Jun 5, 2023
@severo severo linked a pull request Jun 5, 2023 that will close this issue
@severo
Copy link
Author

severo commented Jul 31, 2023

Note, in case somebody looks at this issue to load a HuggingFace dataset with lite.datasette.io, we now provide a simpler API to access the parquet files:

https://lite.datasette.io/?parquet=https://huggingface.co/api/datasets/glue/parquet/ax/test/0.parquet

It does not contain %2F this time 😄

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

Successfully merging a pull request may close this issue.

1 participant