File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ def _load_api_module(self, module_name):
349
349
return importlib .import_module (module_name )
350
350
351
351
def _load_notebook (self , uri ):
352
- """Loads a notebook from the local filesystem or HTTP URL.
352
+ """Loads a notebook from the local filesystem or HTTP(S) URL.
353
353
354
354
Raises
355
355
------
@@ -363,9 +363,10 @@ def _load_notebook(self, uri):
363
363
"""
364
364
parts = urlparse (uri )
365
365
366
- if parts .netloc == '' or parts . netloc == 'file' :
366
+ if parts .scheme not in ( 'http' , 'https' ) :
367
367
# Local file
368
- with open (parts .path ) as nb_fh :
368
+ path = parts ._replace (scheme = '' , netloc = '' ).geturl ()
369
+ with open (path ) as nb_fh :
369
370
notebook = nbformat .read (nb_fh , 4 )
370
371
else :
371
372
# Remote file
You can’t perform that action at this time.
0 commit comments