KeyErrors in localconfig.vdf
AdamWHY2K opened this issue · 2 comments
For some reason the file localconfig.vdf, created by steam, occasionally changes the format of the keys in its dictionaries.
So initially this was fine:
readData["UserLocalConfigStore"]["Software"]["Valve"]["Steam"]["Apps"]
But now the above doesn't work and instead requires:
readData["UserLocalConfigStore"]["Software"]["Valve"]["steam"]["Apps"]
Other users have witnessed the same issue with "Apps" vs "apps".
This would be an easy fix, just did it locally myself
readData = eval(repr(readData).lower())
then all the keys are lower case
edit: maybe a bit heavy handed since it lowercases everything ha.
This might be a better way https://stackoverflow.com/a/823077
Hey thanks, that is infinitely better than what I was going to do. It seems I still have a lot of learning to do.