ValvePython/vdf

Getting `SyntaxError: Unterminated cstring (offset: 1)` when trying to load shortcuts

Closed this issue · 3 comments

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)

Can't possible answer that without the file

Fair enough, file attached ;)

shortcuts.zip

Found what I did wrong, accidentally reading the localconfig file, rather then shortcuts... Stupidly copied the wrong path. Sorry!