Repository navigation
pdf export using webpdf fails #9713
Copy link
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When trying to export to PDF it gives the following error. How to solve? How to even debug?
> marimo export pdf .\test.py -o out.pdf
Exporting PDF: executing notebook...
Exporting PDF: notebook execution finished.
Exporting PDF: serializing notebook for PDF rendering...
Exporting PDF: rendering PDF via WebPDF...
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<Connection.run() done, defined at C:\Users\user\.virtualenvs\marimo\Lib\site-packages\playwright\_impl\_connection.py:305> exception=NotImplementedError()>
Traceback (most recent call last):
File "C:\Users\user\.virtualenvs\marimo\Lib\site-packages\playwright\_impl\_connection.py", line 312, in run
await self._transport.connect()
File "C:\Users\user\.virtualenvs\marimo\Lib\site-packages\playwright\_impl\_transport.py", line 133, in connect
raise exc
File "C:\Users\user\.virtualenvs\marimo\Lib\site-packages\playwright\_impl\_transport.py", line 120, in connect
self._proc = await asyncio.create_subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
)
^
File "C:\Users\user\AppData\Local\Programs\Python\Python314\Lib\asyncio\subprocess.py", line 224, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
stderr=stderr, **kwds)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python314\Lib\asyncio\base_events.py", line 1798, in subprocess_exec
transport = await self._make_subprocess_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
protocol, popen_args, False, stdin, stdout, stderr,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bufsize, **kwargs)
^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python314\Lib\asyncio\base_events.py", line 533, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
Error: Failed to export PDF:
Will you submit a PR?
- Yes
Environment
Details
{
"marimo": "0.23.8",
"editable": false,
"location": "C:/Users/user/.virtualenvs/marimo/Lib/site-packages/marimo",
"OS": "Windows",
"OS Version": "11",
"Processor": "Intel64 Family 6 Model 186 Stepping 2, GenuineIntel",
"Python Version": "3.14.0",
"Locale": "--",
"Binaries": {
"Browser": "--",
"Node": "--",
"uv": "--"
},
"Dependencies": {
"click": "8.3.1",
"docutils": "0.22.4",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.10.2",
"narwhals": "2.18.1",
"packaging": "26.0",
"psutil": "7.2.2",
"pygments": "2.20.0",
"pymdown-extensions": "10.21.2",
"pyyaml": "6.0.3",
"starlette": "1.0.0",
"tomlkit": "0.14.0",
"typing-extensions": "4.15.0",
"uvicorn": "0.42.0",
"websockets": "16.0"
},
"Optional Dependencies": {
"altair": "6.1.0",
"anywidget": "0.11.0",
"loro": "1.10.3",
"nbformat": "5.10.4",
"pandas": "3.0.3",
"polars": "1.39.3",
"pytest": "9.0.3",
"ruff": "0.15.10"
},
"Experimental Flags": {}
}
Code to reproduce
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
akshayka commentedon May 28, 2026
Hi @vascotenner, thank you for reporting. It looks like this is an incompatibility with our PDF export on Windows.
We will look into fixing this.
In the meantime, here are some workarounds:
marimo export pdf --no-webpdf .\test.py -o out.pdf? This will require you to install Pandoc/LaTeX, but may be more reliable.akshayka commentedon May 28, 2026
I believe a fix would be along the lines of #9194
akshayka commentedon May 28, 2026
Here is the upstream issue: jupyter/nbconvert#2287
Yasin197 commentedon May 28, 2026
I've seen this error message too in the past
fix(export): allow WebPDF export on Windows (marimo-team#10131)
vascotenner commentedon Jul 21, 2026
I tested this by creating a new envirment using uv:
uv venv --python 3.14.6I can now export document that do NOT contain marimo widgets.
What not works is when I include an accordion:
mo.accordion({'a': 'Test'})Same error as above (only different path to python).
So the issue is not solved for me. (neither works with python 3.13)
fix(export): allow WebPDF export on Windows (marimo-team#10131)