pandoc-fignos icon indicating copy to clipboard operation
pandoc-fignos copied to clipboard

RuntimeError: Cannot understand pandocversion=3.0.1

Open lamyergeier opened this issue 2 years ago • 9 comments

Not working with Pandoc 3.0.1

  File "/home/lamy/.local/bin/pandoc-tablenos", line 8, in <module>
    sys.exit(main())
  File "/home/lamy/.local/pipx/venvs/pandoc-tablenos/lib/python3.10/site-packages/pandoc_tablenos.py", line 661, in main
    PANDOCVERSION = pandocxnos.init(args.pandocversion, doc)
  File "/home/lamy/.local/pipx/venvs/pandoc-tablenos/lib/python3.10/site-packages/pandocxnos/core.py", line 224, in init
    _PANDOCVERSION = _get_pandoc_version(pandocversion, doc)
  File "/home/lamy/.local/pipx/venvs/pandoc-tablenos/lib/python3.10/site-packages/pandocxnos/core.py", line 179, in _get_pandoc_version
    raise RuntimeError(msg)
RuntimeError: Cannot understand pandocversion=3.0.1

lamyergeier avatar Feb 03 '23 17:02 lamyergeier

Same thing happening to me:

File "/home/cob/.local/bin/pandoc-fignos", line 8, in <module>
    sys.exit(main())
  File "/home/cob/.local/lib/python3.10/site-packages/pandoc_fignos.py", line 608, in main
    PANDOCVERSION = pandocxnos.init(args.pandocversion, doc)
  File "/home/cob/.local/lib/python3.10/site-packages/pandocxnos/core.py", line 224, in init
    _PANDOCVERSION = _get_pandoc_version(pandocversion, doc)
  File "/home/cob/.local/lib/python3.10/site-packages/pandocxnos/core.py", line 179, in _get_pandoc_version
    raise RuntimeError(msg)
RuntimeError: Cannot understand pandocversion=3.0
Error running filter pandoc-fignos:
Filter returned error status 1

CobSammich avatar Feb 05 '23 00:02 CobSammich

Same error for me:

RuntimeError: Cannot understand pandocversion=3.1
Error running filter pandoc-fignos:
Filter returned error status 1
make: *** [pdf] Error 83

nando-kawka avatar Feb 12 '23 19:02 nando-kawka

Same here:

Traceback (most recent call last):
  File "/home/xbelanch/.local/bin/pandoc-fignos", line 8, in <module>
    sys.exit(main())
  File "/home/xbelanch/.local/lib/python3.10/site-packages/pandoc_fignos.py", line 608, in main
    PANDOCVERSION = pandocxnos.init(args.pandocversion, doc)
  File "/home/xbelanch/.local/lib/python3.10/site-packages/pandocxnos/core.py", line 224, in init
    _PANDOCVERSION = _get_pandoc_version(pandocversion, doc)
  File "/home/xbelanch/.local/lib/python3.10/site-packages/pandocxnos/core.py", line 179, in _get_pandoc_version
    raise RuntimeError(msg)
RuntimeError: Cannot understand pandocversion=3.0.1
Error running filter pandoc-fignos:
Filter returned error status 1

xbelanch avatar Feb 15 '23 08:02 xbelanch

This is related to a version regex check in the mentioned package pandocxnos in the file core.py

# Test `pandocversion` and if it is OK then return it
pattern = re.compile(r'^[1-2]\.[0-9]+(?:\.[0-9]+)?(?:\.[0-9]+)?$')

As a workaround you can simply change the 2 in the beginning of the regex to 3.

# Test `pandocversion` and if it is OK then return it
pattern = re.compile(r'^[1-3]\.[0-9]+(?:\.[0-9]+)?(?:\.[0-9]+)?$')

nandokawka avatar Feb 15 '23 08:02 nandokawka

Related issue in the pandocxnos repository: https://github.com/tomduck/pandoc-xnos/issues/28 And related PR: https://github.com/tomduck/pandoc-xnos/pull/29

daviewales avatar Mar 05 '23 21:03 daviewales

You can install nandokawka's patched fork (from the PR above) as follows:

pip install git+https://github.com/nandokawka/pandoc-xnos@284474574f51888be75603e7d1df667a0890504d#egg=pandoc-xnos

daviewales avatar Mar 05 '23 22:03 daviewales

You can install nandokawka's patched fork (from the PR above) as follows:

pip install git+https://github.com/nandokawka/pandoc-xnos@284474574f51888be75603e7d1df667a0890504d#egg=pandoc-xnos

This gives me "Could not find executable pandoc-fignos" when using the filter like pandoc doc.md --filter pandoc-fignos

LinqLover avatar Oct 10 '23 14:10 LinqLover

You can install nandokawka's patched fork (from the PR above) as follows:

pip install git+https://github.com/nandokawka/pandoc-xnos@284474574f51888be75603e7d1df667a0890504d#egg=pandoc-xnos

This gives me "Could not find executable pandoc-fignos" when using the filter like pandoc doc.md --filter pandoc-fignos

What is the install location? Did you use a venv? If pip install works it should be part of the environment.

nandokawka avatar Oct 11 '23 09:10 nandokawka

You can install nandokawka's patched fork (from the PR above) as follows:

pip install git+https://github.com/nandokawka/pandoc-xnos@284474574f51888be75603e7d1df667a0890504d#egg=pandoc-xnos

This gives me "Could not find executable pandoc-fignos" when using the filter like pandoc doc.md --filter pandoc-fignos

What is the install location? Did you use a venv? If pip install works it should be part of the environment.

Default install location, no venv, on a fresh Alpine container. I solved the issue by downgrading pandoc.

LinqLover avatar Oct 12 '23 23:10 LinqLover