ValvePython/steam

[BUG] MobileWebAuth.cli_login raises NoneType error

Opened this issue · 0 comments

Description
Mobile Authenticator raise a NoneType error on attempting to login with cli_login

Steps to Reproduce the behavior

  1. Set username and password on the constructor
  2. use cli_login
  3. do the captcha
  4. do the 2FA

Code

from steam.webauth import MobileWebAuth
username, password = "", ""
wa = MobileWebAuth(username, password)
wa.cli_login()

Expected behavior
It should give me a valid error/successful login

Tracebacks

Traceback (most recent call last):
  File "U:\Programming\PycharmProjects\steam_profile\venv\Lib\site-packages\steam\webauth.py", line 266, in cli_login
    return self.login(password, captcha, email_code, twofactor_code, language)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "U:\Programming\PycharmProjects\steam_profile\venv\Lib\site-packages\steam\webauth.py", line 193, in login
    if resp['success'] and resp['login_complete']:
       ~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

It looks like self._send_login is returning None somehow.

Versions Report

python -m steam.versions_report
steam: 1.4.4

Dependencies:
                 vdf: 3.4
            protobuf: 3.20.3
            requests: 2.32.3
          cachetools: 5.4.0
              gevent: 24.2.1
 gevent-eventemitter: 2.1
       pycryptodomex: 3.20.0
              enum34: Not Installed
       win-inet-pton: Not Installed

Python runtime:
          executable: U:\Programming\PycharmProjects\steam_profile\venv\Scripts\python.exe
             version: 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
            platform: win32

System info:
              system: Windows
             machine: AMD64
             release: 10
             version: 10.0.22631