12

I recently updated the nbdev version of an "old" project of mine (I made a new conda environment), and now automatic tests in github (the "Run tests" part of the build) are failing with a

'coroutine' object is not subscriptable

error per notebook, that seems totally unrelated to my code. There are also a few

RuntimeWarning: Enable tracemalloc to get the object allocation traceback

and

RuntimeWarning: coroutine 'ZMQSocketChannel.get_msg' was never awaited

None of this happens when I run nbdev_test_nbs locally.

Any clue?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
manu
  • 1,333
  • 2
  • 11
  • 24

3 Answers3

9

I faced the very same issue. It turned out that I had nbconvert version pinned in my setup.py, like 'nbconvert~=5.6.1'.

After removing this restriction tests started to pass again.

P.S. The version of nbconvert is now 6+.

Yury Kirienko
  • 1,810
  • 1
  • 22
  • 32
4

This is an issue with jupyter-client, see there was a yanked version deployed on the day you reported: https://pypi.org/project/jupyter-client/#history

This thread details the RCA: https://github.com/jupyter/jupyter_client/issues/637

This was solved for me by downgrading to jupyter-client==6.1.12

Ilya V. Schurov
  • 7,687
  • 2
  • 40
  • 78
Nick
  • 41
  • 1
  • I didn't have `jupyter_client` around, but had this error. In the logs (yours as well) one may see that the source of the error is `nbconvert/preprocessors/execute.py`. – Yury Kirienko Apr 12 '21 at 17:18
0

I was not able to "autograde" the submissions or "validate" my notebooks. For some reason which I do not remember, I downgraded the "nbconvert" to 5.6.1 (I think there was an issue). Having this problem, I have upgraded my "nbconvert" back to 6.5.0 and now I can auto-grade the submissions.

Note: in my other jupyter environment (python 3.6, nbconvert 5.6.1, and jupyter-client: 6.1.7), I can both validate and auto-grade the notebooks.