Closed clotifoth closed 8 years ago
This is very interesting. Reddit's encoding has been problematic in the past. I'll try to see if I can reproduce this.
I reproduced the bug. I can confirm that, at least for that image, removing that line that you listed fixes the issue. I added that line because many titles had issues in the past. I'm going to test it without the re-decoding for a couple of days to see if it works alright.
I'm not quite sure what issue the line was fixing in the first place. What originally happened? Maybe there's a better way to fix it.
I removed the line in the latest commit. I think the original reason I did this was because ImageMagick (the old library I used for image processing) didn't like reddit's text encoding at all. Now that I've migrated over to PIL, there should be no use for that line.
This looks like comes back to this call at line 69 def save_info, download.py
The image proceeded to download and set as wallpaper correctly, but title.txt was completely empty.
It looks like this was the image in question: https://www.reddit.com/r/EarthPorn/duplicates/458b9a/strokkur_geyser_iceland_the_moment_of_eruption_oc/
I figured perhaps it was an Icelandic character getting dropped but the title here doesn't appear to have any of those...