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

Please help about Jupyter file support #31654

Closed
ChanLicher opened this issue Jul 18, 2024 · 7 comments
Closed

Please help about Jupyter file support #31654

ChanLicher opened this issue Jul 18, 2024 · 7 comments
Labels
type/docs This PR mainly updates/creates documentation

Comments

@ChanLicher
Copy link

Description

I 100% followed the instruction of external renderers on the docs, and even fork the repository to build a new docker image. No matter what it return an error:

Render, jupyter render run command jupyter-nbconvert [--stdin --stdout --to html --template basic] failed: exec: "jupyter-nbconvert": executable file not found in $PATH

Part of logs:

`2024/07/18 02:39:06 ...es/charset/escape.go:41:EscapeControlReader() [E] Error whilst escaping: jupyter render run command jupyter-nbconvert [--stdin --stdout --to html --template basic] failed: exec: "jupyter-nbconvert": executable file not found in $PATH
Stderr: 
2024/07/18 02:39:06 ...ers/web/repo/view.go:535:renderFile() [E] Render: jupyter render run command jupyter-nbconvert [--stdin --stdout --to html --template basic] failed: exec: "jupyter-nbconvert": executable file not found in $PATH
Stderr: 
2024/07/18 02:39:06 ...eb/routing/logger.go:102:func1() [I] router: completed GET /ChanLicher/3d_hippocampus/src/branch/master/newtrain.ipynb for 10.60.13.108:6275, 500 Internal Server Error in 12.8ms @ repo/view.go:774(repo.Home)`

I just transferred my code to gitea a few days ago, maybe I am not familiar enough with gitea. But please offer some solutions of how to solve this issue.
PixPin_2024-07-18_02-38-20

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Docker on Linux

How are you running Gitea?

I first used the offical docker image, and tried to install external renderers using command line. After that, I tried to build a docker image with these renderers, but it still returned the same error as mentined above.

Database

MySQL/MariaDB

@yp05327
Copy link
Contributor

yp05327 commented Jul 22, 2024

image
It is jupyter nbconvert in the document.
But in your error logs, it seems that you are using jupyter-nbconvert

@ChanLicher
Copy link
Author

image It is jupyter nbconvert in the document. But in your error logs, it seems that you are using jupyter-nbconvert

Sorry, I didn't mention that. I tried both "jupyter-nbconvert" and "jupyter nbconvert". Scroll down, and you can see another instruction about jupyter notebook, that one uses "jupyter-nbconvert".

@yp05327
Copy link
Contributor

yp05327 commented Jul 23, 2024

image
I think the problem is this. Even you have installed them, but they are not in PATH, so Gitea can not use it.
As a simple solution, you can install them into /usr/local/bin,

RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install jupyter docutils --include-deps

See: pypa/pipx#754

@yp05327 yp05327 added type/docs This PR mainly updates/creates documentation and removed type/bug labels Jul 23, 2024
@yp05327
Copy link
Contributor

yp05327 commented Jul 23, 2024

And also if the rendering was failed, we should not show 500 error page, a flash error is enough I think.

@ChanLicher
Copy link
Author

image I think the problem is this. Even you have installed them, but they are not in PATH, so Gitea can not use it. As a simple solution, you can install them into /usr/local/bin,

RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install jupyter docutils --include-deps

See: pypa/pipx#754

It works! Thank you very much. I think you can add this to the docs. Wonderful project by the way.

@yp05327
Copy link
Contributor

yp05327 commented Jul 25, 2024

Update: There's a more simple solution.
https://gitea.com/gitea/docs/pulls/33

@ChanLicher
Copy link
Author

Cool!

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

No branches or pull requests

2 participants