Skip to content

NBMAKE INTERNAL ERROR: There is no current event loop #71

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

Closed
adamjstewart opened this issue Jul 10, 2022 · 2 comments
Closed

NBMAKE INTERNAL ERROR: There is no current event loop #71

adamjstewart opened this issue Jul 10, 2022 · 2 comments

Comments

@adamjstewart
Copy link

Describe the bug

Starting with nbmake 1.2, we're seeing the following error message in our tests:

NBMAKE INTERNAL ERROR
There is no current event loop
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/_pytest/runner.py", line 338, in from_call
    result: Optional[TResult] = func()
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/_pytest/runner.py", line 259, in <lambda>
lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
returnself._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
returnself._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
return outcome.get_result()
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
    res = hook_impl.function(*args)
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/_pytest/runner.py", line 174, in pytest_runtest_call
raise e
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/_pytest/runner.py", line 166, in pytest_runtest_call
    item.runtest()
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/nbmake/pytest_items.py", line 52, in runtest
    res: NotebookResult = run.execute()
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/nbmake/nb_run.py", line 79, in execute
raise err
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/nbmake/nb_run.py", line 63, in execute
    c.execute(cwd=self.filename.parent)
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/nbclient/util.py", line 84, in wrapped
return just_run(coro(*args, **kwargs))
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/nbclient/util.py", line 47, in just_run
    loop = asyncio.get_event_loop()
...
sys:1: RuntimeWarning: coroutine 'NotebookClient.async_execute' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

To Reproduce

Error log can be seen at https://github.com/microsoft/torchgeo/runs/7272949937. Click on "Install pip dependencies" to see the output of pip list and the versions of all packages we are using.

Expected behavior

These tests work fine with nbmake 1.1: https://github.com/microsoft/torchgeo/runs/7273001912. There seems to have been some change in nbmake 1.2 that broke things.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: N/A
  • Version: N/A
@alex-treebeard
Copy link
Member

Hi @adamjstewart, thanks for this bug report. Please try version 1.3.1 which contains a fixed version of nbclient (see PR above for details).

@adamjstewart
Copy link
Author

Works now, thanks!

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

No branches or pull requests

2 participants