danielfrg / pelican-jupyter

Pelican plugin for blogging with Jupyter/IPython Notebooks
Apache License 2.0
422 stars 105 forks source link

Unexpected keyword error when using liquid-tags mode #101

Closed jreiberkyle closed 6 years ago

jreiberkyle commented 6 years ago

I get the following error when I attempt to render a notebook using the liquid-tags mode:

ERROR: Could not process ./test_coverage.md
  | TypeError: store() got an unexpected keyword argument 'safe'

I don't get this error if I render the same notebook using the markdown mode.

Context

test_coverage.md

Title: A Tutorial
Date: 12/12/2012
Tags: tutorial
Author: Test
Summary: A tutorial

{% notebook calculate_coverage.ipynb %}

My requirements.txt:

pelican==3.7
jupyter         # for pelian-ipynb
nbconvert>=4.0  # for pelian-ipynb
ipython>=4.0    # for pelian-ipynb
markdown>=2.6.1 # for pelian-ipynb

Liquid-tags is installed by downloading __init__.py, mdx_liquid_tags.py, and liquid_tags.py to plugins/liquid_tags from the liquid_tags directory of the plugins repo.

Setting for (successful) markdown mode

calculate_coverage.nbdata:

Title: A Tutorial 
Date: 12/12/2012
Tags: tutorial
Author: Test
Summary: A tutorial
jreiberkyle commented 6 years ago

Hmm.. further testing reveals this is a liquid-tags issue even when I try to render a notebook not using pelican-ipynb. Still, it would be great if someone could try this in their environment and let me know if I'm the only one running into this issue.

danielfrg commented 6 years ago

You can probably fix it by removing the safe keyword from here: https://github.com/danielfrg/pelican-ipynb/blob/a807798842d4219c296823ebcf58ca31302f033b/liquid.py#L45

You can just remove it on your downloaded version of liquid.py.

Maybe a new version of pelican removed that argument.

danielfrg commented 6 years ago

As mentioned on https://github.com/getpelican/pelican-plugins/issues/1069 markdown 3 removed that safe kwarg so I removed it from here.

Let me know if that fixes it.

jreiberkyle commented 6 years ago

That fixed it!