import os
import warnings
os.environ["JUPYTER_PLATFORM_DIRS"] = "1" # remove jupyter_client deprecation warning
warnings.simplefilter("error") # raise the PapermillNotebookClient deprecation warning
from papermill import execute_notebook
execute_notebook("no_parameters.ipynb", "result.ipynb", xxx=100)
Trace:
Traceback (most recent call last):
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/traitlets/traitlets.py", line 1379, in __init__
super().__init__(*super_args, **super_kwargs)
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/denolf/projects/ewokscore/test.py", line 9, in <module>
execute_notebook("no_parameters.ipynb", "result.ipynb", xxx=100)
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/papermill/execute.py", line 119, in execute_notebook
nb = papermill_engines.execute_notebook_with_engine(
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/papermill/engines.py", line 48, in execute_notebook_with_engine
return self.get_engine(engine_name).execute_notebook(nb, kernel_name, **kwargs)
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/papermill/engines.py", line 365, in execute_notebook
cls.execute_managed_notebook(nb_man, kernel_name, log_output=log_output, **kwargs)
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/papermill/engines.py", line 434, in execute_managed_notebook
return PapermillNotebookClient(nb_man, **final_kwargs).execute()
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/papermill/clientwrap.py", line 30, in __init__
super().__init__(nb_man.nb, km=km, raise_on_iopub_timeout=raise_on_iopub_timeout, **kw)
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/nbclient/client.py", line 456, in __init__
super().__init__(**kw)
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/traitlets/config/configurable.py", line 92, in __init__
super().__init__(**kwargs)
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/traitlets/traitlets.py", line 1385, in __init__
warn(
File "/home/denolf/virtualenvs/pybox_yg1f6S/lib/python3.9/site-packages/traitlets/utils/warnings.py", line 14, in warn
warnings.warn(msg, category=category, stacklevel=stacklevel, source=source)
DeprecationWarning: Passing unrecognized arguments to super(PapermillNotebookClient).__init__(input_path='no_parameters.ipynb', xxx=100).
object.__init__() takes exactly one argument (the instance to initialize)
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
Reproduce:
Trace:
I did this in python 3.9 with