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

get_my_inventory not working "Success value should be 1" #345

Open
Onione-Tamiko opened this issue Jan 18, 2024 · 10 comments
Open

get_my_inventory not working "Success value should be 1" #345

Onione-Tamiko opened this issue Jan 18, 2024 · 10 comments

Comments

@Onione-Tamiko
Copy link

Onione-Tamiko commented Jan 18, 2024

изображение
This problem appeared last night.
Steampy v1.1.1
How fix?

@Dandelion101
Copy link

Steam was updated today, this is probably why your error occurs
I tried to repeat your mistake but it didn't work
Try to recreate the session
It is not recommended to check the functionality of the session via is_session_alive(); at the moment it does not work correctly

@Onione-Tamiko
Copy link
Author

@Dandelion101

I created a simple example and tested it.
And I get two different errors.

изображение
изображение
изображение

@Dandelion101
Copy link

@Onione-Tamiko

Perhaps the error occurs due to the fact that you specify the path to mafile and not to steam_guard.json
steam_guard.json = { "steamid": "123", "shared_secret": "123", "identity_secret": "123" }

Do not send the code as a screenshot, it is better to send it in text so that it can be easily copied

@Onione-Tamiko
Copy link
Author

Onione-Tamiko commented Jan 19, 2024

@Dandelion101
Example:

import json, pprint, os

from steampy.client import SteamClient, InvalidCredentials
from steampy.models import Currency, GameOptions
from steampy.client import SteamClient, Asset
from steampy.utils import GameOptions

from bs4 import BeautifulSoup

import re



def SerchFile(steam_login = None , directory_maFiles = None ):
    if None not in [steam_login,directory_maFiles]:
        for file in os.listdir(directory_maFiles):
            if '.maFile' in file:
                with open(f"{directory_maFiles}\\{file}",'r') as file_read:
                    maFile = json.loads(file_read.read())
                if maFile["account_name"] == steam_login.lower():
                    print(f'[INFO][SEARCH_MAFILE] maFile для аккаунта {steam_login} был успешно найден.')
                    return maFile,f"{directory_maFiles}\\{file}"
        else:
            print(f'[ERROR][SEARCH_MAFILE] maFile для аккаунта {steam_login} не был найден в нужной директории.')
            return None




game = GameOptions.STEAM

directory_maFiles = str(os.path.abspath(__file__).replace(os.path.basename(__file__), ''))+'DATA\maFiles'

password = ''
login = ''
api_key = ''


maFile,path_maFile = SerchFile(steam_login = login ,directory_maFiles = directory_maFiles)
steam_client = SteamClient(api_key)
steam_client.login(login, password, path_maFile)

my_inventory = steam_client.get_my_inventory(game)
pprin.pprint(my_inventory)

steam_client.logout()

maFile :
{"shared_secret":" ","serial_number":" ","revocation_code":" ","uri":" ","server_time": "","account_name":" ","token_gid":" ","identity_secret":" ","secret_1":" ","status": ,"device_id":" ","fully_enrolled":true,"Session":{"SessionID":" ","SteamLogin":" ","SteamLoginSecure":" ","WebCookie":" ","OAuthToken":" ","SteamID":}}

I use Files created using Steam Desktop Auth(SDA),
in the library where "steamid" was required, everything was replaced with ["steamid"] > ['Session']['SteamID'].

I repeat, everything worked until last night)

Error 1:

[INFO][SEARCH_MAFILE] maFile для аккаунта SandraIJGeF1Of был успешно найден.
Traceback (most recent call last):
  File "C:\Users\ADMIN\Desktop\Trade_Browser\retertert.py", line 43, in <module>
    my_inventory = steam_client.get_my_inventory(game)
  File "C:\Users\ADMIN\Python38\lib\site-packages\steampy\utils.py", line 23, in func_wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\ADMIN\Python38\lib\site-packages\steampy\client.py", line 157, in get_my_inventory
    return self.get_partner_inventory(steam_id, game, merge, count)
  File "C:\Users\ADMIN\Python38\lib\site-packages\steampy\utils.py", line 23, in func_wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\ADMIN\Python38\lib\site-packages\steampy\client.py", line 168, in get_partner_inventory
    raise ApiException('Success value should be 1.')
steampy.exceptions.ApiException: Success value should be 1.

@Onione-Tamiko
Copy link
Author

Onione-Tamiko commented Jan 19, 2024

I am using python version 3.8.10 and 3.10.11. It doesn 't work on both of them .

I tried to delete and recreate the api_key. It didn't help.

@OlegAlyeynikov
Copy link

OlegAlyeynikov commented Jan 19, 2024

I'm using the buy item method from the steampy library. And for the last two days I’ve been receiving this answer:

{'message': 'There was a problem purchasing your item. The listing may have been removed. Refresh the page and try again.'}

2024-01-19 18:26:33,196 - my_logger - WARNING - There was a problem buying this item. Message: There was a problem buying this item. Message: There was a problem purchasing your item. The listing may have been removed. Refresh the page and try again.

I just can’t cope with this problem, can someone tell me something?

@Dandelion101
Copy link

@OlegAlyeynikov
#343

Steam update came out last night
The last time an update came out and the library broke, the update came out the next day. So I don't think I'll have to wait long for an update.

@Slava-stack
Copy link

Slava-stack commented Jan 20, 2024

The last time an update came out and the library broke, the update came out the next day. So I don't think I'll have to wait long for an update.

The same problem. Have you found any solutions?

@lspeed-v
Copy link

For some reason, get_my_inventory works every other time. Also, I noticed that .is_session_alive() does not work in 90% of cases.

@MirkevychV
Copy link

I've got same error today on prod server, but in development server with the same account and library version it works fine.

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

6 participants