Skip to content

can't run codebraid with new version of jupyter-client #46

@jaycunningham-8451

Description

@jaycunningham-8451

I have the following markdown:

% example
% Jay Cunningham
% 22 April 2021

# What's happening?

```{.python .cb.nb jupyter_kernel=python3 example=false session=foo}
print("hello, world")

I'm running the following command to create slides:

codebraid pandoc -f markdown example.md -t revealjs -s -i -o example.html

If I install jupyter-client==6.1.12, it works fine. If I upgrade it to the most-current jupyter-client==6.2.0, I (usually?) get the following error:

Traceback (most recent call last):
  File "/Users/j260381/.pyenv/versions/kayday-deep-dive/bin/codebraid", line 8, in <module>
    sys.exit(main())
  File "/Users/j260381/.pyenv/versions/3.8.7/envs/kayday-deep-dive/lib/python3.8/site-packages/codebraid/cmdline.py", line 107, in main
    args.func(args)
  File "/Users/j260381/.pyenv/versions/3.8.7/envs/kayday-deep-dive/lib/python3.8/site-packages/codebraid/cmdline.py", line 153, in pandoc
    converter.code_braid()
  File "/Users/j260381/.pyenv/versions/3.8.7/envs/kayday-deep-dive/lib/python3.8/site-packages/codebraid/converters/base.py", line 1199, in code_braid
    self._process_code_chunks()
  File "/Users/j260381/.pyenv/versions/3.8.7/envs/kayday-deep-dive/lib/python3.8/site-packages/codebraid/converters/base.py", line 1213, in _process_code_chunks
    cp.process()
  File "/Users/j260381/.pyenv/versions/3.8.7/envs/kayday-deep-dive/lib/python3.8/site-packages/codebraid/codeprocessors/base.py", line 603, in process
    self._run_jupyter(session)
  File "/Users/j260381/.pyenv/versions/3.8.7/envs/kayday-deep-dive/lib/python3.8/site-packages/codebraid/codeprocessors/base.py", line 1384, in _run_jupyter
    if msg['parent_header'].get('msg_id') != cc_jupyter_id:
TypeError: 'coroutine' object is not subscriptable
sys:1: RuntimeWarning: coroutine 'ZMQSocketChannel.get_msg' was never awaited

It sometimes works the first time I run codebraid after installing 6.2.0, but it always fails the second or further times I run it after making a change to the markdown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions