Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client/cdn: manifest returns dict, gid is a key #461

Closed
wants to merge 1 commit into from
Closed

client/cdn: manifest returns dict, gid is a key #461

wants to merge 1 commit into from

Conversation

StalkR
Copy link

@StalkR StalkR commented Apr 25, 2024

Hello,

I got an exception on get_manifests:

from steam.client import SteamClient
from steam.client.cdn import CDNClient
s = SteamClient()
s.anonymous_login()
cdn = CDNClient(s)
cdn.get_manifests(730)

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/steam/client/cdn.py", line 785, in async_fetch_manifest
    app_id, depot_id, int(manifest_gid), branch_name, branch_pass
TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict'

It's because the manifest object is a dict (I suppose steam must have changed it):

from steam.client import SteamClient
from steam.client.cdn import CDNClient
s = SteamClient()
s.anonymous_login()
cdn = CDNClient(s)
depot_info = cdn.get_app_depot_info(730)
print(depot_info[str(2347770)]['manifests']['public'])
{'gid': '2869365522094710973', 'size': '35004749517', 'download': '28894554320'}

This pull requests fixes it by adding .get('gid') in the relevant code.

Thanks for the project and library! I started using it and I like the API, very short, intuitive, easier to play with than SteamKit/C#.

Fixes exception on get_manifests.
@StalkR
Copy link
Author

StalkR commented Apr 25, 2024

I now see this was reported in 2023 as #436 and there's already a PR (#437) for it.

@StalkR StalkR closed this Apr 26, 2024
Sign up for free to 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