You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jupyter Extension version: 2025.3.0 (however, even 2020.2.0 applies, so it doesn't matter)
Python Extension version: 2025.4.0(not relevant)
OS: Windows 11 24H2
Python and/or Anaconda version: 3.8, 3.11 and 3.12(not relevant)
Type of virtual environment used: conda(not relevant)
Jupyter server running: Local and Remote(not relevant)
Expected Behavior
Exporting a Jupyter notebook to PDF from the VS Code Jupyter extension bar, and get a pdf.
Actual Behavior
Failed to export.
Steps to Reproduce
Open any .ipynb file in VS Code.
Right-click and select "Export as PDF".
Observe the export failure, despite a valid PDF existing in the temp directory (for example "C:\Users...\AppData\Local\Temp\tmp-53764aZammKviOmV0.pdf.pdf").
root cause: pdf is actually generated, however, the extension failed to get his name. For example, the true ath is ...\AppData\Local\Temp\tmp-54084AG2zf2BvEQSm.pdf.pdf, but the extension accesses ...\AppData\Local\Temp\tmp-54084AG2zf2BvEQSm.pdf and thus got a failure.
The code snippet from src/notebooks/export/exportBase.node.ts, if((await this.fs.stat(Uri.file(tempTarget.filePath))).size > 1) await this.fs.copy(Uri.file(tempTarget.filePath), target); is the source of the error. tempTarget.filePath contains the correct temporary filename (e.g., ...\AppData\Local\Temp\tmp-54084AG2zf2BvEQSm.pdf), but the extension is looking for a file with an extra .pdf extension.
A temporary workaround is to modify the code to if((await this.fs.stat(Uri.file(pdfFilePath + '.pdf'))).size > 1) await this.fs.copy(Uri.file(pdfFilePath + '.pdf'), target);.
The text was updated successfully, but these errors were encountered:
CNDY1390
changed the title
Cannot export PDF just with vscode extension (other methods work)
Cannot export PDF just with vscode extension (other methods work), **root cause** found
Apr 29, 2025
CNDY1390
changed the title
Cannot export PDF just with vscode extension (other methods work), **root cause** found
[Root cause found] Cannot export PDF just with vscode extension (other methods work)
Apr 29, 2025
CNDY1390
changed the title
[Root cause found] Cannot export PDF just with vscode extension (other methods work)
Cannot export PDF just with vscode extension (other methods work)
Apr 29, 2025
Uh oh!
There was an error while loading. Please reload this page.
Environment Data
VS Code version: 1.99.3.0(not relevant)Python Extension version: 2025.4.0(not relevant)Python and/or Anaconda version: 3.8, 3.11 and 3.12(not relevant)Type of virtual environment used: conda(not relevant)Jupyter server running: Local and Remote(not relevant)Expected Behavior
Exporting a Jupyter notebook to PDF from the VS Code Jupyter extension bar, and get a pdf.
Actual Behavior
Failed to export.
Steps to Reproduce
.ipynb
file in VS Code.Additional Information
pandoc
ornbconvert
problems. These are not the root cause....\AppData\Local\Temp\tmp-54084AG2zf2BvEQSm.pdf.pdf
, but the extension accesses...\AppData\Local\Temp\tmp-54084AG2zf2BvEQSm.pdf
and thus got a failure.src/notebooks/export/exportBase.node.ts
,if((await this.fs.stat(Uri.file(tempTarget.filePath))).size > 1) await this.fs.copy(Uri.file(tempTarget.filePath), target);
is the source of the error.tempTarget.filePath
contains the correct temporary filename (e.g.,...\AppData\Local\Temp\tmp-54084AG2zf2BvEQSm.pdf
), but the extension is looking for a file with an extra.pdf
extension.if((await this.fs.stat(Uri.file(pdfFilePath + '.pdf'))).size > 1) await this.fs.copy(Uri.file(pdfFilePath + '.pdf'), target);
.The text was updated successfully, but these errors were encountered: