I am trying to run a discord bot… i got the source code from here - thanrek/Scranton-Guesser: A Python Discord bot that turns quotes from a series to screenshots (github.com)
I downloaded all the pip packages that were needed… but my file path for the videos folder is like
D:\Movies\The Office\The Office (US) (2005) Season 1-9 but when i put this in the json file it says invalid escape character or something… does anyone have any idea on how to fix this?
In a JSON string, you need to escape backslashes by adding a second backslash before them. So “D:\Movies\The Office” becomes “D:\Movies\The Office”.
You mean:
"D:\\Movies\\The Office”
(Discourse needs another backslash too ;-))
You got me there.
I tried them but then it showed "D:\Movies\The Office” filepath not found
Thanks to both of you though…
I think the space is the problem there. Replacing it with underscore could help.
I wonder when Microsoft are going to come to their senses, and stop using escape characters as path separators. It’s never not going to cause problems.
You can almost always use d:/movies/the office
as well.
Tried this too… but it didn’t work
Yeah i used to like Microsoft… but their decision are pissing me off sometimes… for example i have Halo MCC on steam… and i can’t play Multiplayer properly due to their outdated IP protocol called Teredo or something and there is no way to fix it either… I am seriously thinking of switching to Linux
Depends on the program/library that interprets the JSON file.