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

Logout unsuccessful #354

Closed
Slava-stack opened this issue Jan 29, 2024 · 2 comments
Closed

Logout unsuccessful #354

Slava-stack opened this issue Jan 29, 2024 · 2 comments

Comments

@Slava-stack
Copy link

Slava-stack commented Jan 29, 2024

after creating a buy order with this code

with SteamClient(api_key, username, password, steam_guard_path) as client:
    response = client.market.create_buy_order("AK-47 | Redline (Field-Tested)", "1000", 1, game, currency)
    buy_order_id = response
    print(buy_order_id)

I receive type of error:

...\env\lib\site-packages\steampy\client.py", line 120, in logout, line 120, in logout
    raise Exception('Logout unsuccessful')
Exception: Logout unsuccessful

everything works good enough but i am currious if I can make this error to be fixed?
My logout function looks excactly like that:

@login_required
def logout(self) -> None:
    url = f'{SteamUrl.STORE_URL}/login/logout/'
    data = {'sessionid': self._get_session_id()}
    self._session.post(url, data=data)
    if self.is_session_alive():
        raise Exception('Logout unsuccessful')

    self.was_login_executed = False
@Lexzach
Copy link

Lexzach commented Feb 23, 2024

Change
url = f'{SteamUrl.STORE_URL}/login/logout/'
to
url = f'{SteamUrl.COMMUNITY_URL}/login/logout/'

@slavasova6
Copy link

thx a lot

maromalo added a commit to maromalo/steampy that referenced this issue Aug 9, 2024
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

3 participants