ValvePython / vdf

📜 Package for working with Valve's text and binary KeyValue format
https://pypi.org/project/vdf/
MIT License
165 stars 30 forks source link

"One too many closing parenthasis" error when there isn't any extra closing parenthasis #58

Open LordVGames opened 6 months ago

LordVGames commented 6 months ago

This was when I was using vdf.parse() on a large .res file (around 5k lines). At first, I kept getting the error when it got to a key like this:

TestParentKey
{
}

The error mentions the line where the closing bracket is. After removing the problem key, the error then mentioned the closing bracket of the parent key for all the other keys. A VSCode extension that also supports VDF files can collapse the file just fine, and shows there doesn't seem to be any extra closing brackets.

I can provide the file that is causing this if need be.