Python Error: 'dict' object has no attribute 'iteritems'


Error “ 'dict' object has no attribute 'iteritems' ”


This is the error getting on using the iteritems function in Python3.

In Python3 the fuction dict.iteritems() iteritems() is removed and we need to use dict.items().

As per their documentation,

Removed dict.iteritems(), dict.iterkeys(), and dict.itervalues(). Instead: use dict.items(), dict.keys(), and dict.values() respectively.

That's all.....

 

Leave a Reply