rosscdh/mkdocs-markdownextradata-plugin

json support broken

AlexH-HankIT opened this issue · 3 comments

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.

Running into the same issue.

fixed btw in latest version