# Open custom notebooks for different filetypes

**URL:** <https://discourse.jupyter.org/t/open-custom-notebooks-for-different-filetypes/11818>\
**Category:** JupyterLab\
**Created:** [November 23, 2021, 2:25pm UTC](https://discourse.jupyter.org/t/open-custom-notebooks-for-different-filetypes/11818 "2021-11-23T14:25:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guillaume1226](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/guillaume1226/32/5744_2.png) [@guillaume1226](https://discourse.jupyter.org/u/guillaume1226)\
**Post date:** [November 23, 2021, 2:25pm UTC](https://discourse.jupyter.org/t/open-custom-notebooks-for-different-filetypes/11818/1 "2021-11-23T14:25:51Z")

</div>

Hi,

I’d like to achieve the following:  
Upon attempting to open a file with an extension/format not supported by Jupyter, I’d like to open a custom notebook instead. For example, I’d like to be able to open a .npz (numpy archive) file and, instead of an error saying that the file format isn’t utf-8 encoded, create a notebook that I could just run to visualize the content of the .npz file.

Is it achievable?

Thanks!

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [November 23, 2021, 8:26pm UTC](https://discourse.jupyter.org/t/open-custom-notebooks-for-different-filetypes/11818/2 "2021-11-23T20:26:33Z")

</div>

Helping folks to work with files in templated notebooks is an interesting idea, but we’d want to be careful that Lab, etc. didn’t think the `npz` actually _was_ a notebook… more like it would be a command (which ideally could be opened _from_ that failure dialog), e.g.

```auto
foo.npz is not UTF-8 Encoded

[CANCEL] [Open with example notebook...]

```

A potential home for such an effort is [jupyterlab-starters](https://github.com/deathbeds/jupyterlab-starters) which is triggered by commands and launcher items, and creates templated files/folders. A starter is currently parametrized by (at least) the current working directory… but an alternate command would make it possible to pre-seed with a file.

In the case of an `.npz`, one would need, well, `numpy`, but other libraries might offer other interesting cases… i guess one would make packages that provided default notebooks (or really any activity), and ensure they brought the correct dependencies along for the ride.
