Closed The0nix closed 2 years ago
I installed version 1.1.1 and everything works there.
UPD: Nope, it only works every other time
Most likely there is enough time for presence data to be requested and arrive before you try listing the users.
Try waiting with client.friends.wait_event(client.friends.EVENT_READY)
before the loop
Thank you for a swift reply! That does not seem to work, however:
(If I use client.friends.wait_event(client.friends.EVENT_READY)
, the event seems to happen before this code.so the wait hangs)
Yeah, that can happen you can check if it already ready before waiting:
if not client.friends.ready:
client.friends.wait_event(client.friends.EVENT_READY)
In your example where you register a callback, you will have to define it earlier. Ideally before logging in.
Considering this as resolved
Description I login to a client using
cli_login
and when I try to get any user from my friendlist, his state is alwaysEPersonaState.Offline
even if he is currently playing.rich_presence
is also empty. If I access the user viaclient.get_user(steam_id)
, the state is alsoEPersonaState.Offline
.Steps to Reproduce the behavior e.g.
Expected behavior State depicts the real state,
rich_presence
contains necessary informationScreenshots If applicable, add screenshots to help explain your problem.
Versions Report
python -m steam.versions_report
`python -m steam.versions_report` says No module named steam.versions_report pip list says `steam` is 1.2.0 I installed with `pip install -U 'steam[client]'`