json support broken
AlexH-HankIT opened this issue · 3 comments
AlexH-HankIT commented
Version: 0.1.3
Python: Python 3.8.2
OS: Windows 10
Since the content of the json file is read using read_bytes(), json.loads() rather than json.load() should be used:
https://github.com/rosscdh/mkdocs-markdownextradata-plugin/blob/master/markdownextradata/plugin.py#L82
With json.load() i'm receiving an error:
AttributeError: 'bytes' object has no attribute 'read'
When I update the method call to json.loads() it works as expected.
I can create a pull request, if required.
rosscdh commented
Thanks! please feel free to make a pr and a test would be great
…On Wed, Apr 29, 2020 at 5:27 AM Alex H ***@***.***> wrote:
Version: 0.1.3
Python: Python 3.8.2
OS: Windows 10
Since the content of the json file is read using read_bytes(),
json.loads() rather than json.load() should be used:
https://github.com/rosscdh/mkdocs-markdownextradata-plugin/blob/master/markdownextradata/plugin.py#L82
With json.load() i'm receiving an error:
AttributeError: 'bytes' object has no attribute 'read'
When I update the method call to json.loads() it works as expected.
I can create a pull request, if required.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#15>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADA6MSUL65AYJGJ275O2IDRO6NB7ANCNFSM4MTLSMTQ>
.
peterw-ibm commented
Running into the same issue.
rosscdh commented
fixed btw in latest version