[New-bugs-announce] [issue36931] json lib doesnt want to load from file

Justin Rose report at bugs.python.org
Wed May 15 18:40:51 EDT 2019


New submission from Justin Rose <jusrosetyler1123 at gmail.com>:

when I run the included file i get an error that looks like:
Traceback (most recent call last):
  File "/home/justin/Desktop/pkmn/main.py", line 10, in <module>
    expansion = json.load(expan_list)
  File "/usr/lib/python3.6/json/__init__.py", line 296, in load
    return loads(fp.read(),
AttributeError: 'str' object has no attribute 'read'
dont know what to make of it

----------
components: Extension Modules
files: main.py
messages: 342609
nosy: Justin Rose
priority: normal
severity: normal
status: open
title: json lib doesnt want to load from file
type: resource usage
versions: Python 3.6
Added file: https://bugs.python.org/file48331/main.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36931>
_______________________________________


More information about the New-bugs-announce mailing list