simonw / datasette-pretty-json

Datasette plugin that pretty-prints any column values that are valid JSON objects or arrays
Apache License 2.0
11 stars 1 forks source link

module 'jinja2' has no attribute 'Markup' #2

Closed simonw closed 2 years ago

simonw commented 2 years ago

Got this error here: https://github-to-sqlite.dogsheep.net/github/issue_comments

simonw commented 2 years ago

Looks like this plugin does the right thing though: https://github.com/simonw/datasette-render-markdown/blob/51671757c6eceee4e06ed33b49aafb1e44478bc6/datasette_render_markdown/__init__.py#L9

simonw commented 2 years ago

I think this is the problem: https://github.com/simonw/datasette-pretty-json/blob/c80c5295b5db2397b975f78305d3dd94d58cca1e/datasette_pretty_json/__init__.py#L20

simonw commented 2 years ago

I was expecting that test to fail.

simonw commented 2 years ago

That shows it installing:

Collecting Jinja2<3.1.0,>=2.10.3

https://jinja.palletsprojects.com/en/3.1.x/changes/?highlight=markup#version-3-1-0 says 3.1.0 is when it should have broken.

simonw commented 2 years ago

I don't know where that constraint is coming from, Datasette itself just says:

https://github.com/simonw/datasette/blob/cb1e093fd361b758120aefc1a444df02462389a3/setup.py#L48

Jinja2>=2.10.3
simonw commented 2 years ago

I'm just going to fix the issue.

simonw commented 2 years ago

That fixed it: https://github-to-sqlite.dogsheep.net/github/issue_comments