-
Notifications
You must be signed in to change notification settings - Fork 362
Description
Description
I'm working in a network drive that has a Windows drive letter (H:) mapped to it. Whenever I try to do a DIFF I get one of two different errors:
Failed to fetch diff with error:Unhandled error
or
Failed to fetch diff with error:Unexpected token H in JSON at position 0
I believe the former happens for plain text files and the other for .ipynb files.
This does not happen when I'm using the same repository on a normal disk.
Reproduce
- Go to a repository on a network drive, wait for the repository to be recognized (can take up to a minute or so, it's somehow very slow)
- Click on the history tab, and select one point in this history
- Click on a file name to view file changes
- See the above mentioned errors
Expected behavior
On a standard Windows file path I get a normal, nice notebook diff. On a network drive I don't get that.
Context
In the developer tools of the browser I can see the following happening when performing above mentioned DIFF (watch the file path):
Invoke-WebRequest -Uri "http://localhost:8888/nbdime/api/gitdiff?1589304998232" `
-Method "POST" `
-Headers @{
"User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36"
"X-XSRFToken"="2|9b634a47|etcetcetc"
"Authorization"="token eteeteetc"
"Accept"="*/*"
"Origin"="http://localhost:8888"
"Sec-Fetch-Site"="same-origin"
"Sec-Fetch-Mode"="cors"
"Sec-Fetch-Dest"="empty"
"Referer"="http://localhost:8888/lab"
"Accept-Encoding"="gzip, deflate, br"
"Accept-Language"="en-GB,en-US;q=0.9,en;q=0.8"
"Cookie"="_xsrf=2|9b634a47|etcetcetc; username-localhost-8889=`"2|1:0|10:1589272611|23:username-localhost-8889|etc`""
} `
-ContentType "application/json" `
-Body "{`"file_path`":`"../../../XXXXX.CORP/FS/RM/RMVM/1. Val/IF9/12 IF9 Framework/2020/2. Code library/3. Model Output - Accuracy.ipynb`",`"ref_local`":{`"git`":`"c31766db6aab37cee15c36c5d77c54a3748187eb`"},`"ref_remote`":{`"git`":`"db34480c53bf45a38845f14643e873beeb76ddd1`"}}"
The response is also useful information. It seems to show that the file path is somewhat mangled (again):
HTTP 422: Unprocessable Entity (Invalid notebook: H:\XXXXX.CORP\FS\RM\RMVM\1. Val\IF9\12 IF9 Framework\2020\2. Code library\3. Model Output - Accuracy.ipynb)
Note that the correct windows path should be either:
"H:\RMVM\1. Val\IF9\12 IF9 Framework\2020\2. Code library \3. Model Output - Accuracy.ipynb"
or
\XXXXX.corp\FS\RM\RMVM\1\1. Val\IF9\12 IF9 Framework\2020\2. Code library \3. Model Output - Accuracy.ipynb
This is a cross post from jupyter/nbdime#524 (comment)
- Python package version:
jupyterlab-git 0.20.0 py_1 conda-forge - Extension version:
JupyterLab v2.1.2
Known labextensions:
app dir: C:\Users\VriesSC\Miniconda3\envs\Toolbox\share\jupyter\lab
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled ok
@jupyterlab/celltags v2.1.2 enabled ok
@jupyterlab/git v0.20.0 enabled ok
@jupyterlab/toc v3.0.0 enabled ok
@lckr/jupyterlab_variableinspector v0.5.0 enabled ok
nbdime-jupyterlab v2.0.0 enabled ok - Git version:
git version 2.26.2.windows.1 - Operating System and its version:
Microsoft Windows 10 Enterprise
Version 10.0.17763 Build 17763
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here.