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

Error loading resource with ? in its location #10

Closed
dportoles opened this issue Feb 19, 2016 · 4 comments
Closed

Error loading resource with ? in its location #10

dportoles opened this issue Feb 19, 2016 · 4 comments
Assignees

Comments

@dportoles
Copy link

When loading a resource with a ? in its location, CKAN-Browser raises an error:
Download error: invalid mode ('wb') or filename

@wilhelmberg
Copy link
Collaborator

Can you point me to an example?

@dportoles
Copy link
Author

@dportoles
Copy link
Author

Maybe related:
This resource of (European Data Portal) raises same error
http://opendata.aragon.es/catalogo/data/espacios-naturales-protegidos-enp_rednat_enp/shp

It's the same shapefile but with other URL (without question mark). Maybe the problem are dashes?

You can reach it searching "enp aragon" and selecting item "Protected natural areas (protected areas)" => SHP

@wilhelmberg
Copy link
Collaborator

@dportoles
Thanks for the examples.

Problem is that the headers of the server response report the file name with quotes " and a semicolon ; like this:

['Content-Disposition']:    attachment; filename="rednat_enp.shp.zip";

So the generated local file path becomes:

path/to/cache-dir/"rednat_enp.shp.zip";

and this is not valid.

Will have to strip the quotes and the semicolon.

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

2 participants