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

[bug] notebook can't display images, but lab can #6267

Closed
Cosin777 opened this issue Jan 8, 2022 · 8 comments
Closed

[bug] notebook can't display images, but lab can #6267

Cosin777 opened this issue Jan 8, 2022 · 8 comments
Milestone

Comments

@Cosin777
Copy link

Cosin777 commented Jan 8, 2022

Hello everone,
Jupyter NoteBook can`t display image but same code works in Jupyter Lab.

My jupyter notebook version is 6.4.3

%%html <img src="1.jpg" />

In Chrome develop tool, network tab:
Notebook requests url: http://<jupyter_url>/edit/1.jpg, with type text/html
Lab requests http://<jupyter_url>/files/1.jpg, with type jpeg

@Cosin777
Copy link
Author

Cosin777 commented Jan 8, 2022

downgrade to 5.5.0, everything works fine

@ivis-akaike
Copy link

ivis-akaike commented Aug 30, 2022

Excuse me for cutting in, I have the same issue.

I use Jupyter.
The Environmental is below.

MicrosoftTeams-image (1)

and tried the test that is written in here (jupyter/nbclassic#89)

MicrosoftTeams-image (2)

I reproduce the same issue( can't see the local image file).

On the other hand, I downgrade Jupyter.
The Environmental is below.

MicrosoftTeams-image (3)

and tried the same test.

MicrosoftTeams-image (4)

I can see the local image file.

Deriving from this, I think there were some changes between notebook versions 6.3.0 and 6.4.3.
Is this correct behavior?

@jedbrown
Copy link

This fixes the analogous issue for nbclassic. jupyter/nbclassic#148

@ericspod
Copy link

I'm getting the same issue but downgrading notebook to 6.3.0 hasn't helped. I tried replicating @ivis-akaike 's environment and I get instead an internal issue with jinja (ImportError: cannot import name 'contextfilter' from 'jinja2').

@ivis-akaike
Copy link

I tried nbclassic's update, but it does not work for my environment.

image

so, I check image's path.「edit」 is still added to URL.

jupyter/nbclassic#148
other command is needed to reflect this pull request?

@ericspod
my emviroment with notebook 6.3.0 looks like works well.
(dont show jinja2 error message.)
I’m sorry I couldn’t be much of a help.
image

@jtpio
Copy link
Member

jtpio commented Jun 8, 2023

For reference this seems to be working fine with Notebook 7 (currently in beta):

image

Normally the fix should be available in nbclassic for the classic notebook UI. Which means this issue could probably be considered as fixed then.

@jtpio
Copy link
Member

jtpio commented Jun 9, 2023

Closing as this should be fixed with the latest versions of Notebook 7, JupyterLab and NBClassic.

Please have a look at the documentation to learn how to run the different UIs on the same Jupyter Server: https://jupyter-notebook.readthedocs.io/en/latest/migrating/multiple-interfaces.html

Feel free to re-open or open a new issue if needed, thanks!

@jtpio jtpio closed this as completed Jun 9, 2023
@ericspod
Copy link

This does appear fixed in Notebook 7, thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants