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

jupyter execute fails for certain notebooks #8

Closed
callmephilip opened this issue Dec 11, 2024 · 4 comments
Closed

jupyter execute fails for certain notebooks #8

callmephilip opened this issue Dec 11, 2024 · 4 comments

Comments

@callmephilip
Copy link
Contributor

Trying to run jupyter execute on some notebooks fail with smth along these lines (complete log here):

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.10/x64/bin/jupyter-execute", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/jupyter_core/application.py", line 283, in launch_instance
    super().launch_instance(argv=argv, **kwargs)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/traitlets/config/application.py", line 1074, in launch_instance
    app.initialize(argv)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/traitlets/config/application.py", line 118, in inner
    return method(app, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/nbclient/cli.py", line 161, in initialize
    self.run_notebook(path)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/nbclient/cli.py", line 215, in run_notebook
    client.execute()
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/jupyter_core/utils/__init__.py", line 165, in wrapped
    return loop.run_until_complete(inner)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/nbclient/client.py", line 709, in async_execute
    await self.async_execute_cell(
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/nbclient/client.py", line 1005, in async_execute_cell
    exec_reply = await self.task_poll_for_reply
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/nbclient/client.py", line 787, in _async_poll_for_reply
    await asyncio.wait_for(task_poll_output_msg, self.iopub_timeout)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/asyncio/tasks.py", line [48](https://github.com/callmephilip/denotebooks/actions/runs/12275311144/job/34250099498#step:8:49)9, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/nbclient/client.py", line 817, in _async_poll_output_msg
    self.process_message(msg, cell, cell_index)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/nbclient/client.py", line 1103, in process_message
    display_id = content.get("transient", {}).get("display_id", None)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

repro here: #7

@rgbkrk
Copy link
Owner

rgbkrk commented Dec 17, 2024

Interesting... That's likely an issue in the jupyter library Deno uses that I think I fixed but haven't brought over to Deno yet. runtimed/runtimed#165

@callmephilip
Copy link
Contributor Author

Current workaround is to run these through nbclient directly using this fork

@rgbkrk
Copy link
Owner

rgbkrk commented Dec 18, 2024

Approved your PR jupyter/nbclient#322. However I'm guessing this notebook doesn't pass validation (even though I made it in either VS Code or jupyterlab at the time).

@callmephilip
Copy link
Contributor Author

Approved your PR jupyter/nbclient#322. However I'm guessing this notebook doesn't pass validation (even though I made it in either VS Code or jupyterlab at the time).

thanks for expediting things @rgbkrk!

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