Problem with Programming Assignment: Social Network Database

AI-Powered Software and System Design in Week 2 > Social Network Database: coursera ai-powered-software-and-system-design programming assignment social-network-database

I keep getting There was a problem compiling the code from your notebook, please check that you saved before submitting. Details:
name ‘session’ is not defined and grade 0/100 despite passing all testcases.

I have tried restarting, rebooting, deleting file entirely and starting again from scratch, I didn’t delete any cell, I also recovered from backup and updated and so on…

I have been on this for over 7 hours and I have punched a hole through my wall, so it would mean everything to me if you could help me out.

Sorry for using incorrect

tags/format I am new here

i am getting There was a problem compiling the code from your notebook, please check that you saved before submitting. Details:
name ‘session’ is not defined

for every test

if you need any details please tell me

Hi @ShailKPatel

Ensure you didn’t delete any setup cells. Check for code that initializes session and make sure it’s executed. If the problem persists, test your functions independently to isolate the issue, or from the Checkpoints section restore the base version of the notebook.

Hope it helps! Let me know if you need further assistance.

Hi @ShailKPatel ,

It could be the execution environment is not up-to-date. You can refresh the kernel and rerun all the code cells.

From the menu bar at the top of your notebook, click:
kernel ->restart & clear all outputs
cell → run all

Thank you for your reply!

I double and even tripled checked that, I restarted the assignment by deleting the files and coping them them from backup and still the problem persists.

It worked!
For someone who is encountering same problem if saving doesn’t solve the problem try restarting the kernel running all cells, then closing the file and save then submit.

1 Like

Good to hear that your problem has been solved! Thanks for sharing the solution :smiley:

Hi. I’m currently facing the same issue. Tried your solution and the other suggestions. The tests are all passed in the notebook, but the system keeps grading the exercises 00/100. The error message is: “There was a problem compiling the code from your notebook, please check that you saved before submitting. Details:
name ‘session’ is not defined”. This error is for all the 4 exercises. It’s an interesting assignment, but this grading thing is making the experience more challenging than it should be. I would appreciate any support here.