NameError: name 'response' is not defined

Getting this very strange response using requests, any ideas?

This looks strange, it appears the previous cell is yet to run, hence, the response variable has not been created in this context.

Its strange because I had run the cell

It seems there is an issue with the Notebook. Have you tried creating a new one and running the same code?

So I just noticed this error doesn’t occur if I run the notebook on Ubuntu, but DOES happen in exactly the same notebook on Mac… Also it does not occur if all the references to response are in the same cell…

1 Like

Now that’s interesting. It must be a bug somewhere on Jupyter notebook running on MacOS.

I can just live with it I suppose

1 Like