You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Manually setting the SteamID
if not hasattr(steam_client, 'steam_guard') or 'steamid' not in steam_client.steam_guard:
steam_client.steam_guard['steamid'] = steam_id
print(f"Manually set SteamID: {steam_id}")
# Now attempts to retrieve the inventory
partner_items = steam_client.get_partner_inventory("317519211", GameOptions.CS)
except Exception as e:
print(f"Error: {e}")
for item_id, item_details in partner_items.items():
item_name = item_details.get('name')
print(f"Item ID: {item_id}, Item Name: {item_name}")
This is the output:
Login successful!
Manually set SteamID: ""
Traceback (most recent call last):
File "main.py", line 28, in
for item_id, item_details in my_items.items():
NameError: name 'my_items' is not defined
Error: Success value should be 1.
Note that steam_client.get_my_inventory() does work with this setup. Also, I just activated SDA and removed my mobile authenticator, so I do have a 15-day restriction on market and trade activities. Maybe this could be causing the issue.
Anybody knows how to solve this issue? Thanks in advance!
The text was updated successfully, but these errors were encountered:
Here is the code causing the issue:
from steampy.client import SteamClient
from steampy.utils import GameOptions
api_key = ""
steam_client = SteamClient(api_key)
username = ''
password = ''
steam_id = '' #Had to use a workaround to log in
try:
steam_client.login(username, password, 'path_to_maFile')
print("Login successful!")
except Exception as e:
print(f"Error: {e}")
for item_id, item_details in partner_items.items():
item_name = item_details.get('name')
print(f"Item ID: {item_id}, Item Name: {item_name}")
This is the output:
Login successful!
Manually set SteamID: ""
Traceback (most recent call last):
File "main.py", line 28, in
for item_id, item_details in my_items.items():
NameError: name 'my_items' is not defined
Error: Success value should be 1.
Note that steam_client.get_my_inventory() does work with this setup. Also, I just activated SDA and removed my mobile authenticator, so I do have a 15-day restriction on market and trade activities. Maybe this could be causing the issue.
Anybody knows how to solve this issue? Thanks in advance!
The text was updated successfully, but these errors were encountered: