Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing images during file conversion #315

Closed
Kreby opened this issue Nov 2, 2022 · 3 comments
Closed

Missing images during file conversion #315

Kreby opened this issue Nov 2, 2022 · 3 comments

Comments

@Kreby
Copy link

Kreby commented Nov 2, 2022

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.

@scornfulMussel6
Copy link

Having the same issue. Happens even when using --resource-path to the directory, at least for DOCX conversions.

@sanjass
Copy link

sanjass commented Dec 24, 2022

Had the same issue and setting sandbox=False when using pypandoc fixed it for me, but see my full comment here

@JessicaTegner
Copy link
Owner

JessicaTegner commented Jan 6, 2023

I'm awear of this, and discussion will continue in #316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants