ValvePython / steam

☁️ Python package for interacting with Steam
http://steam.readthedocs.io
MIT License
1.05k stars 127 forks source link

[BUG] SyntaxError: Invalid magic, got b')DV\x07' #462

Open WinterPhoenix opened 1 week ago

WinterPhoenix commented 1 week ago

Description Steam Client Beta seems to be rolling out a new format again.

Steps to Reproduce the behavior

>>> from steam.utils.appcache import parse_appinfo
>>> header, apps = parse_appinfo(open(r"C:\Users\Winter\Desktop\WIP\appinfo.vdf", "rb"))

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python311_64\Lib\site-packages\steam\utils\appcache.py", line 73, in parse_appinfo
    raise SyntaxError("Invalid magic, got %s" % repr(magic))
SyntaxError: Invalid magic, got b')DV\x07'

Example appinfo.vdf, like last time: appinfo.zip

Versions Report

steam: 1.4.4

Dependencies:
                 vdf: 3.4
            protobuf: 4.21.11
            requests: 2.31.0
          cachetools: 5.2.0
              gevent: Not Installed
 gevent-eventemitter: Not Installed
       pycryptodomex: 3.16.0
              enum34: Not Installed
       win-inet-pton: Not Installed

Python runtime:
          executable: D:\Python311_64\python.exe
             version: 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
            platform: win32

System info:
              system: Windows
             machine: AMD64
             release: 10
             version: 10.0.19045

sonic2kk commented 1 week ago

Looks like the magic changed again for appinfo.vdf, happened a little while ago as well: #418.

Matoking commented 1 week ago

Had a look at the new appinfo.vdf format. Not a case of just the magic number being changed:

https://github.com/ValvePython/steam/pull/463#issuecomment-2196383872

WinterPhoenix commented 1 day ago

@rossengeorgiev Please review the relevant PRs. This should really be fixed sooner rather than later.