You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "testNameTupled.py", line 6, in
vals = namedtupled.json(path="object.json")
File "C:\Users\PERKASA\AppData\Local\conda\conda\envs\python2\lib\site-packages\namedtupled\integrations.py", line 19, in load_json
return mapper(json.load(path), nt_name=name)
File "C:\Users\PERKASA\AppData\Local\conda\conda\envs\python2\lib\json_init.py", line 287, in load
return loads(fp.read(),
AttributeError: 'str' object has no attribute 'read'
The text was updated successfully, but these errors were encountered:
@limsan the confusion, I think, is that the path parameter (in the definition of namedtupled.json) is misnamed. In practice, it is actually meant to be file-like argument of the same type expected by json.load() rather than the name of file as per your (reasonable) expectation.
Traceback (most recent call last):
File "testNameTupled.py", line 6, in
vals = namedtupled.json(path="object.json")
File "C:\Users\PERKASA\AppData\Local\conda\conda\envs\python2\lib\site-packages\namedtupled\integrations.py", line 19, in load_json
return mapper(json.load(path), nt_name=name)
File "C:\Users\PERKASA\AppData\Local\conda\conda\envs\python2\lib\json_init.py", line 287, in load
return loads(fp.read(),
AttributeError: 'str' object has no attribute 'read'
The text was updated successfully, but these errors were encountered: