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

Error from get_partner_inventory: Success value should be 1. #410

Open
The-Penguin-Coder opened this issue Nov 2, 2024 · 0 comments
Open

Comments

@The-Penguin-Coder
Copy link

The-Penguin-Coder commented Nov 2, 2024

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!")

# 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!

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

No branches or pull requests

1 participant