dalibo / pandocker

🐳 A simple docker image for pandoc with filters, templates, fonts, and the latex bazaar
https://hub.docker.com/r/dalibo/pandocker/
BSD 3-Clause "New" or "Revised" License
145 stars 23 forks source link

`!include` was ok with 19.05, fails with 19.08 #109

Closed Krysztophe closed 4 years ago

Krysztophe commented 5 years ago

I have a document that works okay if pandocker:19.05 is hardcoded in the Makefile but fails with 19.08 (Gitlab CI and my setup, docker images are up to date) :

https://gitlab.dalibo.info/formation/workshop_postgres_12/-/jobs/87158

$ make all
Compiling fr/120-postgresql_12.md into fr/120-postgresql_12.slides.html
cd `dirname fr/120-postgresql_12.md` && pandoc --filter pandoc-include --metadata=dlb:/root/.dalibo/themes/ -t revealjs --standalone -V revealjs-url:http://lab.hakim.se/reveal-js/ `basename fr/120-postgresql_12.md` -o `basename fr/120-postgresql_12.slides.html`
Traceback (most recent call last):
  File "/usr/local/bin/pandoc-include", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/pandoc_include.py", line 91, in main
    return pf.run_filter(action, doc=doc) 
  File "/usr/local/lib/python3.5/dist-packages/panflute/io.py", line 260, in run_filter
    return run_filters([action], *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/panflute/io.py", line 241, in run_filters
    doc = doc.walk(action, doc)
  File "/usr/local/lib/python3.5/dist-packages/panflute/base.py", line 273, in walk
    ans = list(chain.from_iterable(ans))
  File "/usr/local/lib/python3.5/dist-packages/panflute/base.py", line 271, in <genexpr>
    ans = ((item,) if type(item) != list else item for item in ans)
  File "/usr/local/lib/python3.5/dist-packages/panflute/base.py", line 268, in <genexpr>
    ans = (item.walk(action, doc) for item in obj)
  File "/usr/local/lib/python3.5/dist-packages/panflute/base.py", line 284, in walk
    altered = action(self, doc)
  File "/usr/local/lib/python3.5/dist-packages/pandoc_include.py", line 61, in action
    raise ValueError('Included file not found: ' + fn + ' ' + entry + ' ' + os.getcwd())
TypeError: Can't convert 'NoneType' object to str implicitly
Error running filter pandoc-include:
Filter returned error status 1
Makefile:171: recipe for target 'fr/120-postgresql_12.slides.html' failed
make: *** [fr/120-postgresql_12.slides.html] Error 83
ERROR: Job failed: exit code 1
github-actions[bot] commented 5 years ago

Stale issue message

daamien commented 4 years ago

@Krysztophe: the issue seems to be fixed. Can you reproduce it ?

Krysztophe commented 4 years ago

I cannot reproduce. Case closed.