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 with long image file name #48
Comments
Hello, and thanks for the detailed issue report! The problem seems to be reproducible on Ubuntu Linux as well, not just on Windows; I'm getting the same error on my machine. The underlying issue seems to be that I should be able to solve this by determining the file name differently in these case scenarios, though; I'm currently looking deeper into this. (On a relatively unrelated side note, I'm glad to see that there are people who are actually using the image caching feature 😀 ) |
Okay, so, I figured out the root of the issue now. It actually had nothing to do with the hashes I mentioned, but rather with the fact that GitHub caches images itself, and that I will fix this tomorrow (in 10-12 hours) and update you once it is done, if that's okay. |
Awesome, thanks for investigating this so quickly! |
The issue should be fixed now; you can update to I also fixed how image names are generated; they should make much more sense now. You will have to delete the already-cached images (probably in the local |
Great, I have tested it and it indeed solves the problem. Thank you! The script now prints a bunch of output, though. Perhaps these |
Oh yes, thanks for pointing that out! I simply forgot to remove the You can update to |
The following Markdown file
fails in WSL with the error:
Reason
This can be reproduced for any image with sufficiently long file name, and for badges from shields.io with a long list of parameters, which result in a file name that encodes these parameters in ascii.
The bug appears to be due to the maximum path length limitation of 260 characters in Windows. Presumably this would also happen in plain Windows and not just WSL, but I could not reproduce due to a different error (
UnicodeEncodeError
).Workaround
The problem can be circumvented by running
gh_md_to_html test.md -i
(deliberately leaving the optional argument to-i
empty to not download images), but this is not ideal.Solution
See this commit in httpie for a possible workaround.
The text was updated successfully, but these errors were encountered: