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

could not determine file extension for https://oeis.org/search?q=id:A000023&fmt=json #256

Closed
anandijain opened this issue Jan 29, 2024 · 4 comments

Comments

@anandijain
Copy link

[2024-01-29 18:29:20] Unrecoverable error while processing https://oeis.org/search?q=id:A000022&fmt=json: standard I/O error - The filename, directory name, or volume label syntax is incorrect. (os error 123)                                                                                      
[2024-01-29 18:29:20] Could not determine file extension for https://oeis.org/search?q=id:A000023&fmt=json

thank you very much for the package its so useful!

im trying to download the OEIS database which (by https://oeis.org/wiki/JSON_Format,_Compressed_Files) does not have an extension for the urls, is there a way to tell dlm that these are going to be json files?

@anandijain
Copy link
Author

i guess i probably also need to give a full filename as theres no obvious way for dlm to derive a filename from the url list, which looks like this

https://oeis.org/search?q=id:A000001&fmt=json
https://oeis.org/search?q=id:A000002&fmt=json
https://oeis.org/search?q=id:A000003&fmt=json
https://oeis.org/search?q=id:A000004&fmt=json
https://oeis.org/search?q=id:A000005&fmt=json
https://oeis.org/search?q=id:A000006&fmt=json
https://oeis.org/search?q=id:A000007&fmt=json

@agourlay
Copy link
Owner

Thanks for the report 👍

I think it would make sense to use the query parameters as file name, in that case search?q=id:A000022 without extension.

This sounds reasonable.

@agourlay
Copy link
Owner

agourlay commented Feb 3, 2024

I think I have understood the issue!

The problem is not that the file extension is missing, dlm handles this case already by generating a filename based on the URL.

The actual issue is that some operating systems, like I guess Windows for you, are not accepting ? and & within file system paths.

The fix is to sanitize the path for that case 03ab686.

Please check the new version https://github.com/agourlay/dlm/releases/tag/v0.3.6 :)

@agourlay
Copy link
Owner

closing due to inactivity and because I think it is fixed ;)

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