-
Notifications
You must be signed in to change notification settings - Fork 564
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
Jupyter notebook -> pdf error #1099
Comments
Can you post the notebook in question and the version of nbconvert your are using (I'd recommend testing this again with 5.6)? Also try running with |
Same here `nbconvert failed: PDF creating failed, captured latex output: ! LaTeX Error: File `tcolorbox.sty' not found. Type X to quit or to proceed, Enter file name: l.4 \usepackage No pages of output. |
@krinkere You'll need to install some extra latex packages. It looks like you need the tcolorbox package, but you may need others. |
I'm having the same issue with a different log (see below). My nbconvert version is 5.6.1. [I 00:38:38.850 NotebookApp] Building PDF
[W 00:38:40.334 NotebookApp] 500 GET /nbconvert/pdf/Dropbox/Udemy_Courses/Machine_Learning_A_to_Z/Data_Sets/Part%209%20-%20Dimensionality%20Reduction/Section%2043%20-%20Principal%20Component%20Analysis%20(PCA)/Udemy-%20PCA.ipynb?download=true (::1): nbconvert failed: PDF creating failed, captured latex output:
[E 00:38:40.341 NotebookApp] { |
Im also gettings the same error. The error log was too long for github, so I uploaded it to pastebin. |
from the nested logs @AnyByte It looks like MikTex is hard crashing:
You likely need to post those log files specifically, though given it's a hard crash inside miktex it may be an issue for the project specifically that nbconvert can't fix. |
I am seeing the same issue. Even though it says
|
Hi guys, I am running into the same issues. Has any of you solved it? |
I was working in a Sagemaker Notebook, this issue resolved. |
Hi all, |
I encountered the same error. I can convert some simple .ipynb files to pdf successfully .(there are only a few pages) But I can not convert .ipynb which contains many pages and the error above appeared . Does this mean that 'Nbconvert' can not convert complicated files ? I am confused. |
The xelatex conversion is rather particular on what it needs installed / passed to work. It's unlikely the length of the notebook and more some feature of the later sections that is failing to render. There's some planned work to help make attachments better but there's not much active development going on around making the debug experience here better. If you generate a latex output (the |
Try to download as .tex file and remove following lines: |
Thanks for advices @MSeal @Brezel31 . |
The .tex document generated is correct and compilable (Atom: pdfTex). It seems to be a compiling error, which can be easily circumnavigated. No need to delete the things suggested by @Brezel31 in my case |
If someone wanted to open a PR to catch and translate these control character errors to something renderable before they crash xelatex I'd be happy to review the PR. I'm unlikely to get to fixing this myself for some time. |
How can i solve this issue? |
@yuliaUU Your issue has been fixed on master. It's caused by using TeX Live or some other version of LaTeX on Windows that was not originally intended for Windows. You can fix your issue by using the latest alpha of 6.0 of nbconvert or by switching to MikTeX. |
@t-makaro thank you! May I ask you to write the commands 8 need to run? Sorry I am a bit new to all of this |
I have a similar error.
I wonder if installation of R latex package has something to do with it, because it worked before and the R packages uses xelatex, too. Thanks for runaround going through .tex format, it worked for me. |
In case it helps: I had recently the same problem. I wrote a python program (version 3.7.6) in a jupyter notebook (version 6.0.3) and got the same error ( Ultimately, the issue came from the fact that I introduced a The problem seems to come from mixing |
It's likely specific to some content in your markdown then. Can you post the markdown that caused the issue? I am guessing there's yet-another unescaped character that the LaTeX conversion tries to interpret. |
Well, the code was simply taken from https://stackoverflow.com/questions/36288670/how-to-programmatically-generate-markdown-output-in-jupyter-notebooks:
I just re-imported this code in my notebook, and the command |
Hello, I am new to LaTeX, working on Mac OS Catalina Notebook: https://github.com/Funnear/math_formulas/blob/master/Logarithms.ipynb
|
Have you tried with 6.0.7? There's a lot of fixes in the 6.0 release though latex is still quite picky about some things that nbconvert doesn't catch well. |
I have updated nbconvert to 6.0.7and tried again. I get the same error. But I look at Anaconda terminal log and see that error messages start with XeTeX in C mode:
|
I just upgraded conda on my mac, and now I am encouthering an emergency stop on ipython nbconvert --to pdf Split4.ipynb with all of my scripts, all of which used to work. If I make a tex file with ipython nbconvert --to latex Slit4.ipynb I get a .tex file that works just fine using my normal latex tool. Here is an example of the problem. and the log when nbcovert to pdf is run and the pdf file that is produced if I run the conversion to latex only and then run my normal version of a latex processor Addition: if I run xelatex on the .tex file that is produced, e.g Then It encouters the error:
but a quit command causes the routine to complete and produce a pdf file , so the issue seems to be some conbination of a problem with the tex file that is produced, and the not being able to handle the error. |
Had the same issue. Found that it was caused by a cell with Python code that I had switched to "Raw Data" cell type to prevent execution. When I switched the cell to "Markdown" cell type the export to PDF worked. |
I had the same problem it was because I typed LaTeX codes kinda wrong. I will write my problem, hope this helps. $ x*2=x^2 $ --- This using is displaying in jupyter notebook but this is wrong and cannot convert a jupyter notebook file to PDF. |
@battalucar This fixed my problem as well. Worth checking for other people who might run into this. |
I had a similar issue, I resolved this by first: I've seen people talking about Good luck! |
nbconvert failed: PDF creating failed, captured latex output: The log file hopefully contains the information to get MiKTeX going again: C:/Users/muhammed/AppData/Local/MiKTeX/2.9/miktex/log/xelatex.log You may want to visit the MiKTeX project page, if you need help. Sorry, but "MiKTeX Configuration Utility" did not succeed. The log file hopefully contains the information to get MiKTeX going again: C:/Users/muhammed/AppData/Local/MiKTeX/2.9/miktex/log/initexmf.log You may want to visit the MiKTeX project page, if you need help. 2021-04-27 22:27:55,129+0200 FATAL xelatex - The memory dump file could not be found. |
I fixed this by (for Ubuntu)
|
I encountered this problem by having a RawNBConvert cell begin with |
I solved my problem |
LaTex fails to convert to PDF if your cells contain markdown codes. |
Circumvent the problem. |
Try to download it as Latex file and then open it with Tex Live and save as pdf. |
The problem lies in some markdown text that could not render to LaTeX. I believe, it is a good idea if the error we get points exactly to the problematic line in the notebook, which does not render with LaTeX. I hope it gets implemented in future 🙂 Till then, as a troubleshooting strategy, we can copy the notebook and eliminate big parts of the notebook while trying to convert it to PDF again and again so that—as the problem scope gets smaller and smaller—after several steps we'll finally find the exact place of the problem! Mine was a link in the Table of Contents pointing to a markdown heading that had a % in the title :)) As we know this is a special character in URLs, I changed % to "Percent" in my title. By the way, I seriously propose not giving up and finally finding the problem because the resulting PDF that LaTeX gives you is terrifically charming 🤩 Long lines of code are soft-wrapped to the next line, and table of content is automatically built via headings, neither of which is available to the PDF version generated from HTML 👀 |
This works! For a long time, I had to save HTML and finally, I could save as PDF now |
Try to check MikTEX for updates, this will probably install the missing packages and let you PDF be generated. |
You probably used the image in your program and imported it from your computer in the Markdown cell. If you run and the image opens, you cannot convert your file to HTML or PDF. You can do this only if you import the image file but don't run it. |
I am unable to generate a pdf from my notebook. I get the following error.
500 : Internal Server Error
The error was:
nbconvert failed: PDF creating failed, captured latex output:
Failed to run "xelatex .\notebook.tex -quiet" command:
^^@:4: Emergency stop
ps: tried removing the '.' from pdf.py
The text was updated successfully, but these errors were encountered: