steampy
steampy copied to clipboard
Logout unsuccessful
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
Change
url = f'{SteamUrl.STORE_URL}/login/logout/'
to
url = f'{SteamUrl.COMMUNITY_URL}/login/logout/'
thx a lot