jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.61k stars 3.38k forks source link

Error in $: mempty #3217

Closed alok closed 7 years ago

alok commented 8 years ago

test filter I was trying to run

I did make the filter executable.

error:

echo "a" | pandoc --filter ~/bin/rm-extra-header.hs
rm-extra-header.hs: Error in $: mempty
CallStack (from HasCallStack):
  error, called at ./Text/Pandoc/JSON.hs:119:12 in pandoc-types-1.17.0.4-Hs1lnmN3LlxJUzRRsnJ77y:Text.Pandoc.JSON
pandoc: Error running filter /Users/alokbeniwal/bin/rm-extra-header.hs
Filter returned error status 1

which pandoc gives the one installed by stack into ~/.local/bin/pandoc.

pandoc version:

pandoc 1.17.1
Compiled with texmath 0.8.6.3, highlighting-kate 0.6.2.
Syntax highlighting is supported for the following languages:
    abc, actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c,
    changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css,
    curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd,
    eiffel, elixir, email, erlang, fasm, fortran, fsharp, gcc, glsl,
    gnuassembler, go, hamlet, haskell, haxe, html, idris, ini, isocpp, java,
    javadoc, javascript, json, jsp, julia, kotlin, latex, lex, lilypond,
    literatecurry, literatehaskell, llvm, lua, m4, makefile, mandoc, markdown,
    mathematica, matlab, maxima, mediawiki, metafont, mips, modelines, modula2,
    modula3, monobasic, nasm, noweb, objectivec, objectivecpp, ocaml, octave,
    opencl, pascal, perl, php, pike, postscript, prolog, pure, python, r,
    relaxng, relaxngcompact, rest, rhtml, roff, ruby, rust, scala, scheme, sci,
    sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl,
    xml, xorg, xslt, xul, yacc, yaml, zsh
jgm commented 8 years ago

+++ Alok Singh [Nov 08 16 03:13 ]:

[1]test filter I was trying to run

I did make the filter executable.

error: echo "a" | pandoc --filter ~/bin/rm-extra-header.hs rm-extra-header.hs: Error in $: mempty CallStack (from HasCallStack): error, called at ./Text/Pandoc/JSON.hs:119:12 in pandoc-types-1.17.0.4-Hs1lnmN 3LlxJUzRRsnJ77y:Text.Pandoc.JSON pandoc: Error running filter /Users/alokbeniwal/bin/rm-extra-header.hs Filter returned error status 1

You're using a filter compiled (or interpreted) against pandoc-types-1.17.0.4, but you're using pandoc 1.17.1, which is compiled against an earlier incompatible version 1.16.1.1.

Simplest fix is to install the latest pandoc, 1.18.

Alternatively you can compile your filter, but you'll need to tell ghc to use pandoc-types-1.16.1.1.

Or remove pandoc-types-1.17.0.4 and install pandoc-types-1.16.1.1 so the interpreter finds that version.

alok commented 8 years ago

fixed, thanks. updating fixed it.