Skip to content
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

Add nbconvert[qtpdf] and nbconvert[webpdf] to UToronto image #5672

Open
jmunroe opened this issue Mar 5, 2025 · 10 comments · May be fixed by 2i2c-org/utoronto-image#63
Open

Add nbconvert[qtpdf] and nbconvert[webpdf] to UToronto image #5672

jmunroe opened this issue Mar 5, 2025 · 10 comments · May be fixed by 2i2c-org/utoronto-image#63
Assignees
Labels
support Issues that track Freshdesk tickets

Comments

@jmunroe
Copy link
Contributor

jmunroe commented Mar 5, 2025

Reference: https://2i2c.freshdesk.com/a/tickets/2830

In Jupyter classic, when a client selects the menu option File -> Download as, I see two options "PDF via HTML". Both of them lead to "Internal Server Errors".

One reports: "nbconvert failed: PyQtWebEngine is not installed to support Qt PDF conversion. Please install nbconvert[qtpdf] to enable."

The other reports: "nbconvert failed: Playwright is not installed to support Web PDF conversion. Please install nbconvert[webpdf] to enable."

Can you please install the necessary packages on the image? Thanks!

@jmunroe jmunroe changed the title Add nbconvert[qtpdf] and nbconvert[webpdf] to image Add nbconvert[qtpdf] and nbconvert[webpdf] to UToronto image Mar 5, 2025
@jmunroe
Copy link
Contributor Author

jmunroe commented Mar 5, 2025

This came through Freshdesk a few weeks ago and should have been picked up in our Iteration 11 planning as a support task.

@jmunroe jmunroe transferred this issue from 2i2c-org/utoronto-image Mar 5, 2025
@jmunroe jmunroe added the support Issues that track Freshdesk tickets label Mar 5, 2025
@jnywong jnywong linked a pull request Mar 11, 2025 that will close this issue
@jnywong
Copy link
Member

jnywong commented Mar 11, 2025

I started some work on this after staff access to the hub was configured in #5545 .

Here is the draft PR for anyone who has capacity to pick up in the current iteration.

I would estimate the effort as more of a 2 or even 3, since installing playwright and pyqtengine for JHub is not straightforward.

@sgibson91
Copy link
Member

sgibson91 commented Mar 13, 2025

@jnywong I don't think you actually linked your PR above?

ETA: It's 2i2c-org/utoronto-image#63

@jnywong
Copy link
Member

jnywong commented Mar 13, 2025

Oo yep you're right, I updated the comment above. Ty Sarah!

@sgibson91 sgibson91 self-assigned this Mar 14, 2025
@sgibson91
Copy link
Member

I have made some progress: The image build now succeeds in CI and exporting to PDF via LaTeX now works.

I'm still struggling with webpdf. I still see the "Please install nbconvert[webpdf]" error even though I am now explicitly installing webpdf. This error also seems to be fatal in the sense that it kills the server, as the notebook warns about being disconnected from the kernel.

Also weirdly, in the "File > Download as" menu, there are two "Pdf via HTML" options, and I don't know what is causing it but suspect it will cause a point of confusion for this community.

Overall, I think this task is beginning to look like an 8 effort or higher.

@sgibson91
Copy link
Member

Can't authenticate a socket?

[W 2025-03-14 13:55:54.622 ServerApp] Couldn't authenticate WebSocket connection
[W 2025-03-14 13:55:54.631 ServerApp] 403 GET /user/sgibson@2i2c.org/api/kernels/438bb7c4-0370-4616-a0fe-7d885bc54fda/channels?session_id=c928835792c04f1e9c8c50995b968e43 (@10.1.0.23) 9.69ms

@sgibson91
Copy link
Member

A different error, but this is from the second "File > Download as > PDF via HTML" option. So this will definitely be confusing for users if they're going to produce different errors.

nbconvert failed: No suitable chromium executable found on the system. Please use '--allow-chromium-download' to allow downloading one,or install it using `playwright install chromium`.

@agoose77
Copy link
Contributor

I can take a look at this today, probably, if you want a second pair of eyes.

@sgibson91
Copy link
Member

Would appreciate that, I think my eyes are becoming less reliable

@jnywong
Copy link
Member

jnywong commented Mar 14, 2025

Fwiw, I also ran into this litany of problems! hug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Issues that track Freshdesk tickets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants