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

fix steam_guard passing and case login after passing login_cookies #294

Merged
merged 2 commits into from
Sep 28, 2023
Merged

fix steam_guard passing and case login after passing login_cookies #294

merged 2 commits into from
Sep 28, 2023

Conversation

makarworld
Copy link
Contributor

@makarworld makarworld commented Sep 28, 2023

login() after passing login_cookies

Error case:

steam_client = SteamClient("API_KEY", login_cookies = cookies)
steam_client.login("USERNAME", "PASSWORD", "guard.json")    
if steam_client.is_session_alive():
    print('ok')

raise in .login() func

...steampy\client.py", line 105, in is_session_alive
    return steam_login.lower() in main_page_response.text.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

because username not saved and steam_login still None

Note

also is_session_alive may check is self.username not None
or add func get_username() for get account login


passing steam_guard in __init__() function

Error case:

steam_client = SteamClient("API_KEY", "USERNAME", steam_guard = "guard.json", login_cookies = cookies)

raise

...steampy\client.py", line 30, in __init__
    self.steam_guard = guard.load_steam_guard(self.steam_guard)
AttributeError: 'SteamClient' object has no attribute 'steam_guard'

because guard.load_steam_guard() should take self.steam_guard_string as arg, not self.steam_guard.

@bukson bukson merged commit d097fb7 into bukson:master Sep 28, 2023
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

Successfully merging this pull request may close these issues.

2 participants