apas / athena

Minimalist static blog generator written in Python
https://apas.github.io/athena/
338 stars 23 forks source link

With recent brew update; pandoc-sidenote no longer is working #19

Open bugra opened 4 years ago

bugra commented 4 years ago

Hi,

Thanks for this blog template first. It is slick and very readable.

I updated pandoc through brew 2 days ago and it broke the build and now getting the following error:

RuntimeError: Pandoc died with exitcode "83" during conversion: b'[WARNING] Deprecated: --base-header-level. Use --shift-heading-level-by instead.\npandoc-sidenote: Error in $: Incompatible API versions: encoded with [1,21] but attempted to decode with [1,20].\nCallStack (from HasCallStack):\n  error, called at ./Text/Pandoc/JSON.hs:107:64 in pandoc-types-1.20-Azr3zp3CsDMiPqJ5OI8N8:Text.Pandoc.JSON\nError running filter pandoc-sidenote:\nFilter returned error status 1\n'

I tried downgrading pandoc, pandoc-crossref, but the error still persisted. My python version is 3.8.3 and pandoc is now 2.10.

apas commented 4 years ago

Good catch, thanks for reporting. I will investigate this.

saahityaedams commented 4 years ago

I had the same issue, something that worked for me was to not use brew for pandoc, pandoc-crossref and instead use the package installer for pandoc 2.9.2.1 and getting a pandoc-crossref binary that matches the above version.

apas commented 4 years ago

Overall, there are two issues: the deprecated --base-header-level option (not blocking) and pandoc-sidenote not being compiled for Pandoc 2.10.x (blocking.)

Fixing the first by changing https://github.com/apas/athena/blob/74e79723c53237275c40c10731717d7ca0dc130d/flatpandoc.py#L92 to "--shift-heading-level-by=2", leads to the second one.

RuntimeError: Pandoc died with exitcode "83" during conversion:
b'pandoc-sidenote: Error in $: Incompatible API versions: encoded
with [1,21] but attempted to decode with [1,20].\nCallStack (from
HasCallStack):\n error, called at ./Text/Pandoc/JSON.hs:107:64 in
pandoc-types-1.20-Azr3zp3CsDMiPqJ5OI8N8:Text.Pandoc.JSON\nError
running filter pandoc-sidenote:\nFilter returned error status 1\n'

Latest Pandoc supported by pandoc-sidenote is 2.9.x. My understanding is that pandoc-sidenote is not actively maintained anymore (2.9 compatibility was written + PR'd by a collaborator) and until there's a fix, it's best to downgrade to a 2.9.x Pandoc.

I will look ways to ship athena with "pinned" Pandoc dependencies.