JupyterLab: Unable to load file after moving notebook to a new location

I’m a newbie to JupyterLab. After I physically move a Python notebook to a different directory and try to open it, I’m unable to load it.

The error I get is: “File Load error for Unhandled Error”

If I move the notebook back to the original location, I can load it and work on it. Can someone please advise me how to resolve this?

Perhaps, this issue is unique to the JupyterLab version. Our team has “jupyterlab 1.0.4” installed on our server. Is this an issue with a specific version of jupyterlab?

I would like to find an answer to this because it causes me a lot of headache. All of sudden, the entire code in a notebook is in accessible to me. The only way I can retrieve that code is to convert the notebook to a *.py file and then manually reconstructing the notebook again

Hi Asim,
Is this on notebooks that currently have the kernel running? I’d suggest shutting down the kernel first if that is the case.
Or a workaround that should work even if the notebook is currently running, is that you should be able to download the notebook to your local drive and then place it back up in the new location. Or use the duplicate feature and then move the duplicated one before opening it.

I encountered this issue today. While I can’t replicate it anymore, it followed when I move an ipynb file to another directory with the same name as the file. That is, I moved metrics.ipynb to ‘…/metrics/’ and got the error mentioned. Renaming the metrics folder to another name fixed the issue.

What type of system @SebastianChk ? Windows or Linux or Mac? Local or server-based? I think the original post was talking about a server and so there was a remote machine involved presumably.

I ran it on Windows, local.

@SebastianChk Is OneDrive involved? There can be issues with users of OneDrive as it stores files actually in different locations than users think. See discussion here.

What you describe sounds like a path issue. You aren’t pointing at the right location. I suspect the directory being the same name is a red herring; however weird bugs do arise. Are you familiar with using ls, %cd, and pwd within a notebook to a navigate your file system and check contents of directories? See here and here links therein. Note that I’m suggesting you start a notebook and do the exploration from within that notebook. That way you’ll assure you see what Jupyter notebook sees and you can compare to what your windows system is telling you.