I tried this and it worked for me. Same pandoc version (well, 3.1.1) but an older macos version (12.5.1).

This 'resource busy' error reminds of what you get when you try to unmount a volume but have a terminal session with its current directory within the to-be-unmounted volume.

So I wonder whether you could try running it from some other location, just in case there's a problem with creating a temporary file, or something like that.

On Fri, 10 Mar 2023 at 04:25, Elephant <rohit.jagan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
No, the pdf file does not exist.

On Thursday, March 9, 2023 at 7:24:54 PM UTC-8 A A wrote:
Is the Pdf open when you get that error?

On Thu, 9 Mar 2023, 21:24 Elephant, <rohit...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello,

When I try to to convert form markdown to pdf with weasyprint or wkhtmltopdf, I get the error message `pandoc: openFile: resource busy (file is locked)`.

For example,

> echo "example" | pandoc -o example.pdf --pdf-engine=wkhtmltopdf
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to '-' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
pandoc: openFile: resource busy (file is locked)

and

> echo "example" | pandoc -o example.pdf --pdf-engine=weasyprint
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to '-' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
pandoc: openFile: resource busy (file is locked)

I'm on macos Ventura 13.2.1 and pandoc 3.1. Any idea how to fix this?

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6076f667-a748-4e17-969c-9264882cd273n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ea4428ac-8ce0-4b96-8830-6d8c2356bd49n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxgAtJ-pZ0c9BsHsusA1uCzPuebD3tg37yL%2BuN4SccLGhA%40mail.gmail.com.