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

Papermill is not working with an error of click/zmq/nbclient #707

Open
corvettettt opened this issue Dec 13, 2022 · 0 comments
Open

Papermill is not working with an error of click/zmq/nbclient #707

corvettettt opened this issue Dec 13, 2022 · 0 comments

Comments

@corvettettt
Copy link

Hi I'm trying to build a new environment. But I ran into a problem which the papermill is not working. My .ipynb file is really simple. only has one single line of print(3). I can't find anything related to this Traceback in Google. Does anyone know how to solve it?

Sorry I can't provide the full list of my package and their versions. That would be too long. I just leave a version list of the package related at the very end of this page. Let me know if you need more information about it.

Traceback (most recent call last):
  File "/opt/conda/bin/papermill", line 8, in <module>
    sys.exit(papermill())
  File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/papermill/cli.py", line 267, in papermill
    execution_timeout=execution_timeout,
  File "/opt/conda/lib/python3.7/site-packages/papermill/execute.py", line 124, in execute_notebook
    **engine_kwargs
  File "/opt/conda/lib/python3.7/site-packages/papermill/engines.py", line 49, in execute_notebook_with_engine
    return self.get_engine(engine_name).execute_notebook(nb, kernel_name, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/papermill/engines.py", line 367, in execute_notebook
    cls.execute_managed_notebook(nb_man, kernel_name, log_output=log_output, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/papermill/engines.py", line 436, in execute_managed_notebook
    return PapermillNotebookClient(nb_man, **final_kwargs).execute()
  File "/opt/conda/lib/python3.7/site-packages/papermill/clientwrap.py", line 43, in execute
    with self.setup_kernel(**kwargs):
  File "/opt/conda/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/opt/conda/lib/python3.7/site-packages/nbclient/client.py", line 562, in setup_kernel
    self.start_new_kernel_client()
  File "/opt/conda/lib/python3.7/site-packages/nbclient/util.py", line 84, in wrapped
    return just_run(coro(*args, **kwargs))
  File "/opt/conda/lib/python3.7/site-packages/nbclient/util.py", line 62, in just_run
    return loop.run_until_complete(coro)
  File "/opt/conda/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
    return future.result()
  File "/opt/conda/lib/python3.7/site-packages/nbclient/client.py", line 532, in async_start_new_kernel_client
    await ensure_async(self.kc.wait_for_ready(timeout=self.startup_timeout))
  File "/opt/conda/lib/python3.7/site-packages/nbclient/util.py", line 96, in ensure_async
    result = await obj
  File "/opt/conda/lib/python3.7/site-packages/jupyter_client/client.py", line 187, in _async_wait_for_ready
    msg = await self.shell_channel.get_msg(timeout=1)
  File "/opt/conda/lib/python3.7/site-packages/jupyter_client/channels.py", line 224, in get_msg
    ready = await self.socket.poll(timeout)
  File "/opt/conda/lib/python3.7/site-packages/zmq/_future.py", line 387, in poll
    f = cast(Future, p.poll(timeout))
  File "/opt/conda/lib/python3.7/site-packages/zmq/_future.py", line 128, in poll
    socket._add_recv_event('poll', future=watcher)
  File "/opt/conda/lib/python3.7/site-packages/zmq/_future.py", line 493, in _add_recv_event
    self._add_io_state(POLLIN)
  File "/opt/conda/lib/python3.7/site-packages/zmq/_future.py", line 663, in _add_io_state
    self._update_handler(self._state)
  File "/opt/conda/lib/python3.7/site-packages/zmq/_future.py", line 679, in _update_handler
    self._get_loop()
  File "/opt/conda/lib/python3.7/site-packages/zmq/_future.py", line 62, in _get_loop
    self._init_io_state(self._current_loop)
TypeError: _init_io_state() takes 1 positional argument but 2 were given
Could not destroy zmq context for <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7fa8e282dc10>

here are packages versions which might related to the error:

Python                    3.7.13
click                     8.0.4 
papermill                 2.4.0  
nbclient                  0.5.13
jupyter_client            5.3.4
pyzmq                     24.0.1
@corvettettt corvettettt changed the title Papermill is not working with a strange error of click/zmq/nbclient Papermill is not working with an error of click/zmq/nbclient Dec 13, 2022
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