I have looked up similar questions, yet most problems are related to omitting the self
argument in the __init__
definition.
Code:
class steamurl():
baseurl = "http://api.steampowered.com/{0}/{1}/{2}/"
def __init__(self, loc1, loc2, vnum, **options):
self.loc1 = loc1
self.loc2 = loc2
self.vnum = vnum
self.options = options
optionsdic = {
'key': 'KEYHERE',
'game_mode': 'all_pick',
'min_players': '7'
}
testurl = steamurl("IDOTA2Match_570", "GetMatchHistory", "v001", optionsdic)
However here my code was working fine before I added the "optionsdic" to the class. After adding it I get the type error in the title. Am I using **kwargs
incorrectly as an argument?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…