0

python err why

https://code.sololearn.com/c16X4McWg5Fs from https://code.sololearn.com/cHY97taN2cLB i get this err from my pc Traceback (most recent call last): File "C:\Users\Shmulik Zilberman\Desktop\Python\Python code\play.py", line 3, in <module> kenneth = Thief("kenneth", sneaky=False) File "C:\Users\Shmulik Zilberman\Desktop\Python\Python code\characters.py", line 8, in __init__ for key, value in kwargs.item(): AttributeError: 'dict' object has no attribute 'item' please help thanks

26th Feb 2019, 6:26 PM
Shmuel israel Zilberman
Shmuel israel Zilberman - avatar
2 Answers
+ 1
items not item
26th Feb 2019, 6:38 PM
Nathan Lewis
Nathan Lewis - avatar
+ 1
Be more careful with typos. Characters.py Line 5 raise VlaueError("gatta put in the name dude!!") --> ValueError Line 8 for key, value in kwargs.item(): --> kwargs.items() You should use an IDE with a good linter (Syntax and style checker) that will help you prevent these errors. This is like spellchecking but in programming its ultimately much more important.
27th Feb 2019, 5:12 AM
Tibor Santa
Tibor Santa - avatar