Cython in Jupyter in VS Code

Howdy Folks,

I got the following error and do not know, what it means resp. how to solve it, any ideas / hints?:

Thanks in advance and
Cheers, Dominik

PS: Windows 10…

Sometimes a picture is worth a thousand words…

Dominik suggested:

“Sometimes a picture is worth a thousand words…”

This is not one of those times.

Aside from making it more difficult for people to see your error, and
impossible for blind people using a screen reader, what benefit does
your image provide? Are you showing a bug in a GUI widget, or a graph
that is drawn wrong? If your error isn’t about a graphical element, then
an image instead of text is not appropriate.

If it is a traceback, that’s text. Please copy and paste the text into
your response. If you can show a minimal reproducible example, please
do. Again, please use text, unless you edit your code with Photoshop.

Judging from your subject line, you have five possible sources of
error here:

  • your code
  • Cython
  • Jupyter
  • VS Code
  • Python

If the error is hard to diagnose, you should try eliminating each of the
three intermediate layers and see if the error remains.

  • does the code do what you expect as pure Python code run directly in
    the Python interpreter?

  • does it work if you use Cython directly without Jupyter and VS Code?

etc. If you only get an error in Jupyter, then it’s a bug in Jupyter.
If you get an error when eliminating everything except your code and
Python, then it’s probably a bug in your code.