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

Pandoc error withBinaryFile #81

Closed
pepijnvtol opened this issue Mar 28, 2024 · 3 comments
Closed

Pandoc error withBinaryFile #81

pepijnvtol opened this issue Mar 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@pepijnvtol
Copy link

Hi,

At this moment I have the most simple example. What I did was:

mdbook init test_mdbook_pdf
>>> Do you want a .gitignore to be created? (y/n)
>>> y
>>> What title would you like to give the book? 
>>> test book
[INFO] (mdbook::book::init): Creating a new book with stub content

cd test_mdbook_pdf
mdbook serve

Yes this worked, the default book showed (with 1 chapter)

cargo install --git https://github.com/max-heller/mdbook-pandoc.git mdbook-pandoc
# book.toml
[book]
title = "test book"

[output.pandoc.profile.pdf]
output-file = "output.pdf"
to = "latex"

Then I run mdbook build and get these info and error messages:

2024-03-28 16:28:45 [INFO] (mdbook::book): Book building has started
2024-03-28 16:28:45 [INFO] (mdbook::book): Running the pandoc backend
2024-03-28 16:28:45 [INFO] (mdbook::renderer): Invoking the "pandoc" renderer
pandoc: book\pdf\src\chapter_1.md: withBinaryFile: invalid argument (Invalid argument)
pandoc exited unsuccessfully
2024-03-28 16:28:45 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2024-03-28 16:28:45 [ERROR] (mdbook::utils): Error: Rendering failed
2024-03-28 16:28:45 [ERROR] (mdbook::utils):    Caused By: The "pandoc" renderer failed

What can cause this error?

Running windows 10

>>> pandoc --version
pandoc.exe 3.1.9
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: C:\Users\USER_NAME\AppData\Roaming\pandoc
Copyright (C) 2006-2023 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.
@max-heller
Copy link
Owner

max-heller commented Apr 6, 2024

This seems to be a result of rust-lang/rust#42869 and should be fixed by #84

@max-heller
Copy link
Owner

Fix released in 0.6.4. I no longer encounter the error locally, but let me know if you continue seeing it

@pepijnvtol
Copy link
Author

pepijnvtol commented Apr 8, 2024

The new version also solved the issue on my machine. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants