mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Incorrect file icon with `jupterlab-desktop` #1010

Closed tuanpham96 closed 2 years ago

tuanpham96 commented 2 years ago

Hi, I use jupterlab-desktop 3.4.6-1 on ubuntu 20.04 and it seems that when I have jupytext installed, the file icons seem to be wrong or missing.

For example:

wrong-mimetypes-jlb

I originally raised an issue in https://github.com/jupyterlab/jupyterlab-desktop/issues/509 and we figured out there might be some conflict with jupytext. Removing + rebuilding with pip uninstall jupytext && jupyter lab build seems to fix it:

remove-jupytext

Is there a reason for this and how to fix it, or workarounds?

Thanks!

mwouts commented 2 years ago

Hello @tuanpham96 ... Well the reason is that, when Jupytext is installed, Markdown files and Python scripts (and many other files like even Bash scripts) are considered as notebooks.

If you want to restrict the files extensions that should be considered as notebooks, you can set a value for notebook_extensions in your jupytext.toml file (list of extensions, or coma separated values) - but you won't be able to open these files as notebooks anymore.

tuanpham96 commented 2 years ago

Thanks for your answer! I'll close it now.