jupyterlab-hdf5 icon indicating copy to clipboard operation
jupyterlab-hdf5 copied to clipboard

Directory not found "hdf:"

Open caviri opened this issue 5 years ago • 10 comments

Hello,

I try to open some .h5 files in Jupyterlab 1.2.5 and jupyterlabhdf 0.3.0 but this error appears:

Directory not found "hdf:"

I have jupyterhub running remotely in a linux machine.

Thanks in advance!

caviri avatar Feb 19 '20 11:02 caviri

Ok, is due to the extension. It seems is only accepting files with .hdf5 format.

caviri avatar Feb 21 '20 09:02 caviri

In fact, I get the same error (Jupyterlab 1.2.6, jupyterlab-hdf5 0.4.0) whatever the extension of the file... Maybe the issue is not solved yet ?

loichuder avatar Mar 02 '20 10:03 loichuder

I also have this issue in Jupyterlab 2.2.8, with jupyterlab-hdf-0.4.1. I think this one needs reopening :(

StanczakDominik avatar Sep 18 '20 08:09 StanczakDominik

I have the same issue. Could you please reopen this issue?

183amir avatar Sep 21 '20 13:09 183amir

Happened just today with jupyterlab 3.1.18 and jupyterlab-hdf 1.0.0. I can't get the extension to show any files, it just shows that anytime I click on it on the side.

image

Migelo avatar Oct 19 '21 10:10 Migelo

This is usually due to the server extension not enabled/installed.

Could you see if jupyterlab_hdf is present and activated (OK) when running jupyter serverextension list ?

loichuder avatar Oct 19 '21 12:10 loichuder

It is activated and OK.

$ jupyter serverextension list
config dir: /homedir/.jupyter
    jupyter_nbextensions_configurator  enabled
    - Validating...
      jupyter_nbextensions_configurator 0.4.1 OK
config dir: /path/to/config/dir
    jupyter_resource_usage  enabled
    - Validating...
      jupyter_resource_usage  OK
    jupyterlab  enabled
    - Validating...
      jupyterlab 3.1.18 OK
    jupyterlab_git  enabled
    - Validating...
      jupyterlab_git 0.33.0 OK
    jupyterlab_hdf  enabled
    - Validating...
      jupyterlab_hdf 1.0.0 OK
    nbdime  enabled
    - Validating...
      nbdime 3.1.0 OK
    jupyter_nbextensions_configurator  enabled
    - Validating...
      jupyter_nbextensions_configurator 0.4.1 OK

Migelo avatar Oct 19 '21 19:10 Migelo

  • Can you try import jupyterlab_hdf in a Python console to see if it works ?
  • How did you install the extension ? Can you try in a fresh virtual environment to see the problem persists ?
  • What kind of file are you trying to open ?

loichuder avatar Oct 20 '21 07:10 loichuder

  • nothing happens after I import it, so I guess that means it works :)
  • I installed with pip. On a fresh installation I tried to open a file /u/username/pyslurm/historical.hdf5and got this error in the jupyterlab terminal. For some reason the leading / missing in the 2nd line.
[E 2021-10-20 10:12:14.704 ServerApp] The request specified a file that does not exist.
    relfpath: u/username/pyslurm/historical.hdf5, uri: /, min_ndim: None, ixs
[historicalbackup.zip](https://github.com/jupyterlab/jupyterlab-hdf5/files/7379388/historicalbackup.zip)
tr: None, subixstr: None, attr_keys: None
[W 2021-10-20 10:12:14.705 ServerApp] 403 GET /hdf/contents/u/username/pyslurm/historical.hdf5?uri=%2F&1634717534675 (130.183.86.36) 21.11ms referer=https://localhost:50125/lab/workspaces/auto-L

Migelo avatar Oct 20 '21 08:10 Migelo

* nothing happens after I import it, so I guess that means it works :)

Yeah, sorry I should have told you to also try to print jupyterlab_hdf.__version__ in the console for clearer troubleshooting.

* I installed with `pip`. On a fresh installation I tried to open a file `/u/username/pyslurm/historical.hdf5`and got  this error in the jupyterlab terminal. For some reason the leading `/` missing in the 2nd line.
[E 2021-10-20 10:12:14.704 ServerApp] The request specified a file that does not exist.
    relfpath: u/username/pyslurm/historical.hdf5, uri: /, min_ndim: None, ixs
[historicalbackup.zip](https://github.com/jupyterlab/jupyterlab-hdf5/files/7379388/historicalbackup.zip)
tr: None, subixstr: None, attr_keys: None
[W 2021-10-20 10:12:14.705 ServerApp] 403 GET /hdf/contents/u/username/pyslurm/historical.hdf5?uri=%2F&1634717534675 (130.183.86.36) 21.11ms referer=https://localhost:50125/lab/workspaces/auto-L

The / is not missing: jupyterlab-hdf works with paths relative to the directory where jupyter lab was launched. Is the path correct with respect to the path where you launched JLab ?

Good sign the Hdf: error does not appear in a fresh env.

To fix it on your former env, you can try the following procedure:

  • Uninstall both the labextension with jupyter labextension uninstall and the serverextenstion with pip uninstall jupyterlab_hdf.
  • Clear the cache of pip and jlpm (pip cache purge and jlpm cache clean)
  • Rebuild JupyterLab (jupyter lab build) and check that both the labextension and the serverextension were uninstalled.
  • Reinstall the labextension and the serverextension and rebuild JupyterLab
  • Check if the problem is fixed
* a file containing the historical usage of our HPC cluster
  [historicalbackup.zip](https://github.com/jupyterlab/jupyterlab-hdf5/files/7379400/historicalbackup.zip)

If the path is correct, the file should open in the extension: I managed to open it without trouble

loichuder avatar Oct 20 '21 08:10 loichuder