Closed ferrybig closed 1 year ago
Interesting, I'll take a look. Thanks!
I was unable to reproduce this after pasting your line. If there's a rogue character in your csv, it's possible github has stripped it out.
Some brief googling also points to the fact that this is maybe a windows-specific issue, which I wouldn't be able to reproduce anyway.
If it's just that one line giving you trouble, I'd try to manually retype the word Minecraft
in your csv and the rest hopefully works fine.
The other option would be to make sure I include a file encoding, but I'm not sure if that has implications for other users who write non-english content.
Running the import on the same file on Linux worked without issues, maybe linux and windows default to different encoding when opening a file
I came across this issue myself on Windows. Pretty simple fix, thankfully. (Though I'm annoyed my archive took 16 days to generate, coming to me only after all the deletions. 😔)
In csv_helpers.py
on Line 41
with open(validate_and_build_path(archive_path, filename), encoding="utf8") as archive_rows:
and on Line 50:
with open(validate_and_build_path(archive_path, "statistics"), encoding="utf8") as stat_rows:
To clarify, the difference is adding , encoding="utf8"
to make sure Python is using UTF-8 to open the archive files. Because that's what these files are stored in.
And I don't know what other OSes do by default (I suppose Python does do UTF-8 on Linux by default), but on Windows it's not, I suppose.
Eh, chances are you might not need that second change, since statistics.csv is all ASCII, but eh. If it were me, I'd change both, because I like the consistency, but it doesn't really matter.
Trying to run the program gives the following error:
The error mentions "comments" and "position 3438" , looking via notepad++ which is the following line:
The error points to position in the middle of the subreddit name, the space between Mine and Craft