Getting `SyntaxError: Unterminated cstring (offset: 1)` when trying to load shortcuts
Closed this issue · 3 comments
TheOddler commented
I'm trying to read and edit the shortcuts.vdf
file, but something is going wrong, as I get the error SyntaxError: Unterminated cstring (offset: 1)
. Is it me that is doing something wrong, or is this a bug?
My code:
import vdf
shortcutsFileLocation = "/home/user/.steam/steam/userdata/1234/config/localconfig.vdf"
shortcutsFile = open(shortcutsFileLocation, "rb")
shortcutsBytes = shortcutsFile.read()
shortcuts = vdf.binary_loads(shortcutsBytes)
rossengeorgiev commented
Can't possible answer that without the file
TheOddler commented
Fair enough, file attached ;)
TheOddler commented
Found what I did wrong, accidentally reading the localconfig
file, rather then shortcuts
... Stupidly copied the wrong path. Sorry!