OpenXbox / xbox-webapi-python

A python library to authenticate with Xbox Live via your Microsoft Account and provides Xbox related Web-API.
https://pypi.python.org/pypi/xbox-webapi
MIT License
181 stars 47 forks source link

Help with xbox_presence: Pydantic #102

Open Sergio-Pedraza opened 10 months ago

Sergio-Pedraza commented 10 months ago

when querying for some user batches, one may fail with an error like this:

1 validation error for PresenceBatchResponse 0.devices.0.titles.0.activity Input should be a valid list [type=list_type, input_value={'richPresence': 'Neptune: Story'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.5/v/list_type

I've done nothing but to provide a list of user ids to the xbl_client.presence.get_presence_batch method. There might be something in the validation or the responses that makes the whole batch invalid. Oddly enough, generally a few hours later the request executes successfully.