Missing images during file conversion
Kreby opened this issue · 3 comments
This issue is similar to #294 but it looks like progress on that has stalled and my use case is slightly different as I am using the rebase_relative_paths extension. I've tried a number of different combinations of changing the working directory and providing a resource path but no matter what I can't get pypandoc to convert a document with images. Maybe I'm missing something but the document converts fine using an almost identical command provided to the pandoc binary. I have tried multiple versions of pandoc, the version listed below was just the last one I tested against.
I've created a repo with an example that will hopefully help.
Using pypandoc
>./main.py
[WARNING] Could not fetch resource documents/doc1/doc/../resources/image.png: PandocResourceNotFound "documents/doc1/doc/../resources/image.png"
Running the same command in pandoc doesn't produce any warnings about missing resources.
> pandoc documents/doc1/doc/test.md --from=markdown+rebase_relative_Paths --to=docx -o output/result.docx
>
> pip show pypandoc
Name: pypandoc
Version: 1.10
Summary: Thin wrapper for pandoc.
Home-page: https://github.com/JessicaTegner/pypandoc
Author: b'Juho Veps\xc3\xa4l\xc3\xa4inen'
Author-email: bebraw@gmail.com
License: MIT
Location: /Users/username/.pyenv/versions/3.10.1/envs/pypandoc-test/lib/python3.10/site-packages
Requires:
Required-by:
> python --version
Python 3.10.1
> pandoc --version
pandoc 2.18
Compiled with pandoc-types 1.22.2, texmath 0.12.5, skylighting 0.12.3,
citeproc 0.7, ipynb 0.2, hslua 2.2.0
Scripting engine: Lua 5.4
User data directory: /Users/kreby/.local/share/pandoc
Copyright (C) 2006-2022 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
Having the same issue. Happens even when using --resource-path to the directory, at least for DOCX conversions.
Had the same issue and setting sandbox=False
when using pypandoc
fixed it for me, but see my full comment here
I'm awear of this, and discussion will continue in #316