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):
349349 return importlib .import_module (module_name )
350350
351351 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.
353353
354354 Raises
355355 ------
@@ -363,9 +363,10 @@ def _load_notebook(self, uri):
363363 """
364364 parts = urlparse (uri )
365365
366- if parts .netloc == '' or parts . netloc == 'file' :
366+ if parts .scheme not in ( 'http' , 'https' ) :
367367 # Local file
368- with open (parts .path ) as nb_fh :
368+ path = parts ._replace (scheme = '' , netloc = '' ).geturl ()
369+ with open (path ) as nb_fh :
369370 notebook = nbformat .read (nb_fh , 4 )
370371 else :
371372 # Remote file
You can’t perform that action at this time.
0 commit comments