GithubHelp home page GithubHelp logo

Comments (4)

MSeal avatar MSeal commented on July 26, 2024 1

I'll keep doing some testing on this as I workout changes needed for papermill to continue working as intended. It's possible a different change I made caused the warning in tests to crop up as an execution error.

from nbclient.

MSeal avatar MSeal commented on July 26, 2024

Hmm looks like it might be an actual issue when I was testing with papermill (some changes needed to make that work as well):

sys:1: RuntimeWarning: coroutine 'NotebookClient._wait_for_reply' was never awaited
Executing: 100%|████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [01:04<00:00, 10.02s/cell]
Traceback (most recent call last):
  File "/home/mseal/.py3local/bin/papermill", line 11, in <module>
    load_entry_point('papermill', 'console_scripts', 'papermill')()
  File "/home/mseal/.py3local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/mseal/.py3local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/mseal/.py3local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mseal/.py3local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/mseal/Workspace/papermill/papermill/cli.py", line 235, in papermill
    execution_timeout=execution_timeout,
  File "/home/mseal/Workspace/papermill/papermill/execute.py", line 104, in execute_notebook
    **engine_kwargs
  File "/home/mseal/Workspace/papermill/papermill/engines.py", line 49, in execute_notebook_with_engine
    return self.get_engine(engine_name).execute_notebook(nb, kernel_name, **kwargs)
  File "/home/mseal/Workspace/papermill/papermill/engines.py", line 343, in execute_notebook
    cls.execute_managed_notebook(nb_man, kernel_name, log_output=log_output, **kwargs)
  File "/home/mseal/Workspace/papermill/papermill/engines.py", line 402, in execute_managed_notebook
    return PapermillNotebookClient(nb_man, **final_kwargs).execute()
  File "/home/mseal/Workspace/papermill/papermill/clientwrap.py", line 40, in execute
    self.nb.metadata['language_info'] = info_msg['content']['language_info']
TypeError: 'coroutine' object is not subscriptable
sys:1: RuntimeWarning: coroutine 'NotebookClient._wait_for_reply' was never awaited

from nbclient.

davidbrochart avatar davidbrochart commented on July 26, 2024

The warnings are due to message mocking now being async, which creates coroutines in prepare_cell_mocks. It also appends an idle message to terminate the execute requests, but some tests (e.g. test_eventual_deadline_iopub) don't process all messages on purpose, leaving this last message not awaited.
I'm not sure how we should deal with this, maybe by awaiting the unprocessed messages at the end of the tests, or by having prepare_cell_mocks optionally append the idle message. We could also disable this warning altogether.

from nbclient.

MSeal avatar MSeal commented on July 26, 2024

Closing for now, don't think we need to take any action atm

from nbclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.