~/.local/lib/python3.6/site-packages/kubeflow/fairing/preprocessors/converted_notebook.py in preprocess(self)
119 exporter = nbconvert.PythonExporter()
120 exporter.register_preprocessor(self.notebook_preprocessor, enabled=True)
--> 121 contents, _ = exporter.from_filename(self.notebook_file)
122 converted_notebook = Path(self.notebook_file).with_suffix('.py')
123 if converted_notebook.exists() and not self.overwrite:
/usr/local/lib/python3.6/dist-packages/nbconvert/exporters/exporter.py in from_filename(self, filename, resources, **kw)
165 if not 'metadata' in resources or resources['metadata'] == '':
166 resources['metadata'] = ResourcesDict()
--> 167 path, basename = os.path.split(filename)
168 notebook_name = os.path.splitext(basename)[0]
169 resources['metadata']['name'] = notebook_name
/usr/lib/python3.6/posixpath.py in split(p)
105 """Split a pathname. Returns tuple "(head, tail)" where "tail" is
106 everything after the final slash. Either part may be empty."""
--> 107 p = os.fspath(p)
108 sep = _get_sep(p)
109 i = p.rfind(sep) + 1
TypeError: expected str, bytes or os.PathLike object, not NoneType
**What did you expect to happen:**
**Anything else you would like to add:**
Utility function does not return file name.
In[]
from kubeflow.fairing.notebook import notebook_util
print(notebook_util.get_notebook_name())
/kind bug
What steps did you take and what happened:
The following code was executed in JupyterLab 3.0.
/usr/local/lib/python3.6/dist-packages/nbconvert/exporters/exporter.py in from_filename(self, filename, resources, **kw) 165 if not 'metadata' in resources or resources['metadata'] == '': 166 resources['metadata'] = ResourcesDict() --> 167 path, basename = os.path.split(filename) 168 notebook_name = os.path.splitext(basename)[0] 169 resources['metadata']['name'] = notebook_name
/usr/lib/python3.6/posixpath.py in split(p) 105 """Split a pathname. Returns tuple "(head, tail)" where "tail" is 106 everything after the final slash. Either part may be empty.""" --> 107 p = os.fspath(p) 108 sep = _get_sep(p) 109 i = p.rfind(sep) + 1
TypeError: expected str, bytes or os.PathLike object, not NoneType
from kubeflow.fairing.notebook import notebook_util print(notebook_util.get_notebook_name())
None