Jupyter Notebook: pictures from up directories are not shown
See original GitHub issueExpected/actual behavior
I work with Jupyter Notebook in VS Code and insert picture in Markdown field. If picture is in the same folder as .ipynb file or directory down - everything is working fine. But pictures from up directories are not shown. Browser version of Jupyter Notebook works fine. And if I run python script in VSC and try to open file from up directories it’s working too. Is it a bug? I changed paths & slashes, terminal paths, notebook (Python > Data Science) settings, swithed between conda and “usual” python and it doesn’t help.
Steps to cause the bug to occur
For example I have project in D:/Project folder. Notebook is inside “./scriptFolder” and I’m inserting several images. Pics from notebook folder and directories down are shown, other not. With tree it looks like this:
Project
|----dataFolder
| |----data.txt
| |----vsData.jpg (this pic is not shown)
|----scriptFolder
| |----pic
| | |----vsDown.jpg (this pic is shown)
| |----jNotebook.ipynb (our notebook)
| |----vs.jpg (this pic is also shown)
|----vsUp.jpg (this pic is not shown)
I run this scripts:
# %% [markdown]
<img src="./vs.jpg" /> (shown)
<img src="./pic/vsDown.jpg" /> (shown)
<img src="./../vsUp.jpg" /> (not shown)
<img src="./../dataFolder/vsData.jpg" /> (not shown)
# %%
f = open("./../dataFolder/data.txt","r")
print(f.read())
GIF version
Jupyter and/or Python environment
- Jupyter server running: Local
- Extension version: Python 2020.3.71659
- VS Code version: 1.44
- Python/Anaconda version: 3.7.6(+3.8.2)/2020.02
- OS: Windows
- Virtual environment: N/A
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Validated. Should be in our released bits.
Wow, thanks a lot! You’re doing a great job!