Bug 2212263

Summary: [abrt] python3-nbconvert: run_command(): pdf.py:150:run_command:nbconvert.exporters.pdf.LatexFailed: PDF creating failed, captured latex output:
Product: [Fedora] Fedora Reporter: Martin Ueding <mu>
Component: python-nbconvertAssignee: Lumír Balhar <lbalhar>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 38CC: epel-packagers-sig, jonathan, mhroncok, python-packagers-sig, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/6b0172a719cf162bfaa25a2f3eb48961cd9c9fee
Whiteboard: abrt_hash:b63ee73ccedd2facdf4c2edf5fd40c182110b9a5;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-22 11:17:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Ueding 2023-06-05 06:47:35 UTC
Description of problem:


Version-Release number of selected component:
python3-nbconvert-7.2.5-5.fc38

Additional info:
reporter:       libreport-2.17.10
kernel:         6.2.12-300.fc38.x86_64
cmdline:        /usr/bin/python3 -P /bin/jupyter-nbconvert /tmp/0d7f1c95-248f-460c-a2e8-8703236db767/Gleichung.ipynb --to pdf --output tmp-95827DPZTmIszM0DB.pdf --output-dir /tmp --debug
uid:            1000
reason:         pdf.py:150:run_command:nbconvert.exporters.pdf.LatexFailed: PDF creating failed, captured latex output:
executable:     /bin/jupyter-nbconvert
type:           Python3
package:        python3-nbconvert-7.2.5-5.fc38
runlevel:       N 5
exception_type: nbconvert.exporters.pdf.LatexFailed
crash_function: run_command
interpreter:    python3-3.11.3-1.fc38.x86_64
comment:        

Truncated backtrace:
#1 [/usr/lib/python3.11/site-packages/nbconvert/exporters/pdf.py:150] run_command
#2 [/usr/lib/python3.11/site-packages/nbconvert/exporters/pdf.py:164] run_latex
#3 [/usr/lib/python3.11/site-packages/nbconvert/exporters/pdf.py:194] from_notebook_node
#4 [/usr/lib/python3.11/site-packages/nbconvert/exporters/exporter.py:207] from_file
#5 [/usr/lib/python3.11/site-packages/nbconvert/exporters/exporter.py:190] from_filename
#6 [/usr/lib/python3.11/site-packages/nbconvert/nbconvertapp.py:491] export_single_notebook
#7 [/usr/lib/python3.11/site-packages/nbconvert/nbconvertapp.py:563] convert_single_notebook
#8 [/usr/lib/python3.11/site-packages/nbconvert/nbconvertapp.py:600] convert_notebooks
#9 [/usr/lib/python3.11/site-packages/nbconvert/nbconvertapp.py:426] start
#10 [/usr/lib/python3.11/site-packages/traitlets/config/application.py:1043] launch_instance
#11 [/usr/lib/python3.11/site-packages/jupyter_core/application.py:276] launch_instance
#12 [/bin/jupyter-nbconvert:8] <module>

Comment 1 Fedora Admin user for bugzilla script actions 2023-10-31 00:46:42 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 2 Lumír Balhar 2023-11-02 16:03:24 UTC
I'm able to reproduce the bug. The problem n.1 is that xelatex is not a default dependency of nbconvert but the message informing about that is quite descriptive:

OSError: xelatex not found on PATH, if you have not installed xelatex you may need to do so. Find further instructions at https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.

But even when you install xelatex, you'll get another set of errors about missing modules for latex. I got these one by one:

! LaTeX Error: File `tcolorbox.sty' not found.
! LaTeX Error: File `parskip.sty' not found.
! LaTeX Error: File `upquote.sty' not found.
! LaTeX Error: File `eurosym.sty' not found.
! LaTeX Error: File `adjustbox.sty' not found.

I installed RPM packages providing those packages one by one and then I gave up.

Questions to be solved:
1. Do we want xelatex as a default dependency of nbconvert?
2. Is there any way how to install complete working set of latex modules for nbconvert?

@mhroncok what do you think?

Comment 3 Miro Hrončok 2023-11-02 17:59:31 UTC
> Do we want xelatex as a default dependency of nbconvert?

I wouldn't do it, it's quite a big pile of packages. But we can make it a weak dependency.

> Is there any way how to install complete working set of latex modules for nbconvert?

We can create the list and make a metapackage. However, I am not sure how to properly obtain it. There is https://pagure.io/fedtex which might help (Script for installing Fedora TeXLive packages required by a document.)

(If we do this, we might as well do it with pandoc.)

Comment 4 Lumír Balhar 2023-11-07 10:41:05 UTC
fedtex helped to identify the following dependencies:

Following packages detected:  tex(tcolorbox.sty) tex(parskip.sty) tex(graphicx.sty) tex(caption.sty) tex(float.sty) tex(xcolor.sty) tex(enumerate.sty) tex(geometry.sty) tex(amsmath.sty) tex(amssymb.sty) tex(textcomp.sty) tex(upquote.sty) tex(eurosym.sty) tex(iftex.sty) tex(fontenc.sty) tex(alphabeta.sty) tex(ucs.sty) tex(inputenc.sty) tex(fontspec.sty) tex(unicode-math.sty) tex(fancyvrb.sty) tex(grffile.sty) tex(adjustbox.sty) tex(hyperref.sty) tex(titling.sty) tex(longtable.sty) tex(booktabs.sty) tex(array.sty) tex(calc.sty) tex(enumitem.sty) tex(ulem.sty) tex(mathrsfs.sty)

After that, I got another error:

OSError: bibtex not found on PATH, if you have not installed bibtex you may need to do so. Find further instructions at https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.

So I installed bibtext and then, finally, nbconvert was able to generate pdf from a simple notebook.

I'm not sure I want to add and maintain this list of dependencies in nbconvert package.

Comment 5 Miro Hrončok 2023-11-07 14:23:33 UTC
Adding it is easy, but maintaining it is hard.

Could we use fedtex in %check?

Comment 6 Aoife Moloney 2024-05-22 11:17:33 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.