Answers for "'str' object has no attribute 'read'"

0

'str' object has no attribute 'read'

read closely, it is two different functions with very similar names. json.load() takes a file like object with a read() method, json.loads() takes a string. It's easy to miss the "s" at the end and think they are the same method. – 
Joshmaker
 Apr 25 '13 at 12:02
Posted by: Guest on October-21-2021

Code answers related to "'str' object has no attribute 'read'"

Python Answers by Framework

Browse Popular Code Answers by Language