Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PapermillNotebookClient deprecation warning: unrecognized argument input_path #783

Closed
woutdenolf opened this issue Mar 3, 2024 · 1 comment

Comments

@woutdenolf
Copy link

Reproduce:

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.

I did this in python 3.9 with

jupyter_client            8.6.0
jupyter_core              5.7.1
nbclient                  0.9.0
papermill                 2.5.0
platformdirs              4.2.0
traitlets                 5.14.1
@woutdenolf
Copy link
Author

Sorry, it was already fixed by #740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant