Help! Got different results when running code in C2W2 Notebook locally and remotely!

Hi all,

I’m a little bit confused when executing Course 2 Week 2 Programming Assignment locally and remotely on Coursera Notebook.

When I ran 2nd cell (below the cell I need to code) locally on my PC. It gave me an error like below:

But I can pass the 3rd cell in Exercise 2 locally.

And I could pass the 2 cells below when I was executing on Coursera Notebook.

Could you please help me with this? Don’t know if there is something wrong with my code.

Ok, you passed all the tests in the Coursera environment but failed (a few) on your local PC. You need to replicate the Coursera environment on your local PC, using the same versions of all libraries. Unfortunately, there is no official guide for this, nor is this an easy task. But these threads may help: thread 1 and thread 2.

2 Likes