-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Initial Checks
- I have searched the existing issues for a duplicate and I'm sure this is something new
- I am confident that the issue in the project code
Description
I am writing my own SteamGuardApp, and at the moment I am faced with the problem of receiving confirmation data.
I needed to get the confirmation details for the correct processing.
Steps To Reproduce
- I receive all confirmations
conf = await client.get_confirmations()
- I'm going through the confirmation list
for configrmation in conf:
- I'm trying to get confirmation information
conf_data = await client.get_confirmation_details(configrmation)
- get error
File "c:\Users\...\...\...\...\...\...\sda.py", line 46, in sda_view_confirmations
conf_data = await client.get_confirmation_details(configrmation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\...\...\...\.venv\Lib\site-packages\aiosteampy\mixins\confirmation.py", line 267, in get_confirmation_details
return loads(ITEM_INFO_RE.search(rj["html"])["item_info"]) # TODO TypedDict
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Environment
- OS: Windows
- Python: 3.12.2
Additional Information
I started looking at what the problem was, went to the source code, and noticed that the resulting JSON did not match what we were trying to extract from it.
If in short, the JSON does not contain the item_info key, but only 2 keys: success, html
I know that it used to be possible to receive full confirmation details, but now at least such data is being returned.
How can I fix it?
I don't know, but at the moment, I haven't found a way to get full confirmation data. The only option is to use the data received from
await client.get_confirmations()
and process them only. :/
UPD: This is only if you are trying to get purchase confirmation information.
I checked it for sale, and I'm getting the full details.