Repository navigation
[BUG] SyntaxError: Invalid magic, got b')DV\x07' #462
Description
Activity
Looks like the magic changed again for
appinfo.vdf, happened a little while ago as well: #418.Had a look at the new
appinfo.vdfformat. Not a case of just the magic number being changed:Reacted by Eamonn Rea and Aaron- added 7 commits that reference this issue
on Jun 28, 2024 @rossengeorgiev Please review the relevant PRs. This should really be fixed sooner rather than later.
I made a fork that incorporates the PR that fixes this, as well as several other pending PRs in this repo. I don't really particularly want to be the new maintainer for this, but if I'm still using it I may as well. PRs on the fork welcome.
Reacted by Eamonn Rea and Janne PulkkinenOne option would be to vendor the relevant code and/or libraries, though I don't know if that is possible for projects using GPL and other similar licenses like Protontricks. Debian also doesn't like vendored code to my knowledge.
I've instead opted to push a version to Flathub beta branch with the fix. For pip users I've instructed to install the libraries from GitHub directly. Other than that, the current options are limited as
vdfandsteamlibraries are packaged by upstream distros.@rossengeorgiev has had some sporadic activity on GitHub, but these two ValvePython projects haven't had any activity in a while. I have to emphasize that they're not obligated to work on these libraries - open source development is often a thankless job and maintainers are prone to burnout, after all - though it would be appreciated if they could state whether these projects are in maintenance mode or abandoned.
Reacted by Eamonn Rea- added a commit that references this issue
on Aug 3, 2024 I would post this on @WinterPhoenix 's fork (https://github.com/solsticegamestudios/steam) but it doesn't allow issues:I've installed the package with this command:
python -m pip install -U "git+https://github.com/solsticegamestudios/steam#egg=steam"Running this code:
from steam.utils.appcache import parse_appinfo header, apps = parse_appinfo(open('c:\\Steam\\appcache\\appinfo.vdf', 'rb')) print(next(apps))raises a TypeError:
Traceback (most recent call last): File "c:\Projects\tests\appinfo_test.py", line 3, in <module> print(next(apps)) ^^^^^^^^^^ File "C:\Users\{my_name}\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\steam\utils\appcache.py", line 137, in apps_iter app['data'] = binary_load(fp, key_table=key_table, mapper=mapper) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\{my_name}\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\vdf\__init__.py", line 326, in binary_load if not issubclass(mapper, Mapping): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen abc>", line 123, in __subclasscheck__ TypeError: issubclass() arg 1 must be a classPrinting the header comes back fine:
{'magic': b')DV\x07', 'universe': 1}Could the Valve have broken this again?
Nevermind, running:
header, apps = parse_appinfo(open('c:\\Steam\\appcache\\appinfo.vdf', 'rb'), mapper=dict)
works completely fineReacted by Jan Arman ParpinIssues are enabled… What does it say when you try to create one, specifically?
Nevermind it actually does, I was looking at another
steamfork
Description
Steam Client Beta seems to be rolling out a new format again.
Steps to Reproduce the behavior
Example
appinfo.vdf, like last time:appinfo.zip
Versions Report