首页 > 解决方案 > 类型错误:change_email() 缺少 1 个必需的位置参数:'self'

问题描述

所以...点蒸汽,请帮助!开始后,它给了我一个错误:

回溯(最近一次通话最后):文件“C:/Users/viznu/OneDrive/Рабочий стол/Python/sssteam.py”,第 42 行,在 sc.change_email(password=passwd, email='mail', code=code_mail )类型错误:change_email()缺少1个必需的位置参数:'self'

错误:

import steam.webauth as wa
from steam.client import SteamClient as sc

#---------------------------------
#---------------------------------
login = 'login'

passwd = '12345' 
#---------------------------------
#---------------------------------

user = wa.WebAuth(login, passwd)

try:
    user.login()
    if wa.steam.webauth.LoginIncorrect:
        print('ERROR!, please, check password!')
except wa.CaptchaRequired:
    print(user.captcha_url)
    # ask a human to solve captcha
    captcha = input('Print captcha')
    user.login(captcha=capthca)

except wa.EmailCodeRequired:
    code_mail = input('Please, type your guard.\n')
    user.login(email_code=code_mail)

except wa.TwoFactorCodeRequired:
    code_2fa = input('Please, type your guard.\n')
    user.login(twofactor_code=code_2fa)


except wa.HTTPError:
    print('Error, please, check data\nError:', wa.HTTPError)


print('Success! You connected to steam id: "',user.steam_id,'"')

mail = 'mail@mail.com'
change = input("Please, type key\n1. Change mail and password\n2. Change mail\n")
if wa.EmailCodeRequired:

    sc.change_email(password=passwd, email='mail', code=code_mail)
elif wa.TwoFactorCodeRequired:
    sc.change_email(password=passwd, email='mail', code=code_2fa)

user.session.get('https://store.steampowered.com/account/history/')
# OR

标签: pythonpipsteam

解决方案


推荐阅读