Skip to content

Get the gid from the branch dict when not encrypted. - #476

Open
yorick1989 wants to merge 1 commit into
ValvePython:masterfrom
yorick1989:bugfix/manifest_gid
Open

Get the gid from the branch dict when not encrypted.#476
yorick1989 wants to merge 1 commit into
ValvePython:masterfrom
yorick1989:bugfix/manifest_gid

Conversation

@yorick1989

Copy link
Copy Markdown

I found the following error when trying to pull the manifest information of a specific appid:

>>>fromsteam.client.cdnimportCDNClient>>>client=SteamClient()
>>>client.anonymous_login()
<EResult.OK: 1>>>>mycdn=CDNClient(client)
>>>mycdn.get_manifests(730)
...
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/mnt/Data/Development/python-venv/lib/python3.12/site-packages/steam/client/cdn.py", line857, inget_manifestsresult=task.get()
^^^^^^^^^^File"src/gevent/greenlet.py", line829, ingevent._gevent_cgreenlet.Greenlet.getFile"src/gevent/greenlet.py", line373, ingevent._gevent_cgreenlet.Greenlet._raise_exceptionFile"/mnt/Data/Development/python-venv/lib/python3.12/site-packages/gevent/_compat.py", line50, inreraiseraisevalue.with_traceback(tb)
File"src/gevent/greenlet.py", line906, ingevent._gevent_cgreenlet.Greenlet.runFile"/mnt/Data/Development/python-venv/lib/python3.12/site-packages/steam/client/cdn.py", line785, inasync_fetch_manifestapp_id, depot_id, int(manifest_gid), branch_name, branch_pass^^^^^^^TypeError: int() argumentmustbeastring, abytes-likeobjectorarealnumber, not'dict'

It seemed that it was setting the whole depot branch dict as manifest_gid instead of the gid only for non-encrypted branches. Therefor I made this small bugfix to set the gid from the branch instead. See here the results:

>>>fromsteam.clientimportSteamClient>>>fromsteam.client.cdnimportCDNClient>>>>>>client=SteamClient()
>>>client.anonymous_login()
<EResult.OK: 1>>>>mycdn=CDNClient(client)
>>>mycdn.get_manifests(730)
[<CDNDepotManifest(731, app_id=730, depot_id=731, gid=7233957520227140199, creation_time='2024-10-25 18:03:57')>, <CDNDepotManifest(2347770, app_id=730, depot_id=2347770, gid=6010599137649566576, creation_time='2024-10-25 18:05:47')>, <CDNDepotManifest(2347771, app_id=730, depot_id=2347771, gid=55193810267189550, creation_time='2024-10-25 18:06:17')>, <CDNDepotManifest(2347773, app_id=730, depot_id=2347773, gid=4272288505887646214, creation_time='2024-10-25 18:06:23')>, <CDNDepotManifest(2347774, app_id=730, depot_id=2347774, gid=2942185934659498548, creation_time='2024-10-01 23:54:10')>, <CDNDepotManifest(228988, app_id=228980, depot_id=228988, gid=6645201662696499616, creation_time='2022-05-04 21:41:13')>, <CDNDepotManifest(228990, app_id=228980, depot_id=228990, gid=1829726630299308803, creation_time='2013-02-18 21:47:57')>]

fabieu added a commit to fabieu/steam-next that referenced this pull request Dec 28, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yorick1989