Off-platform Project Frida Kahlo Retrospective

Hi,

Seems that this project may be relatively new, but I’m not sure what i’m doing wrong. I even looked at the solutions jupyter notebook and copy pasted the exact same answers I was giving, but I’m receiving the same error below for task #3 despite already defining it in task #1. What am I doing wrong?

NameError Traceback (most recent call last)
in
----> 1 paintings = list(zip(paintings, dates))
2 print (paintings)

NameError: name ‘paintings’ is not defined


Any help or guidance would be greatly appreciated!

Hello @rinker, welcome to the forums! Can you post your full code, please? And a screenshot of your IDLE/text editor?

1 Like

Did you run the cells above? (the lists–paintings and dates)?

Also, look at your print() statement.

1 Like

I am getting this same error. When I run the code in IDLE (ipython terminal), it works fine. I’m not sure why it is not working in Jupyter.

Is there an extra space in your print() statement like the person above?

No. This is the code getting an error.

paintings = [‘The Two Fridas’, ‘My Dress Hangs Here’, ‘Tree of Hope’, ‘Self Portrait With Monkeys’]
dates = [1939, 1933, 1946, 1940]
paintings = list(zip(paintings, dates))
print(paintings)

And the code cells above were fine? Maybe run them again, or, restart the kernals in the notebook.

(I ran the code in Colab and had zero issues.)

Restarting the kernals worked. I thought it was strange that it worked in IDLE, but not Jupyter. I hope this helped @rinker

1 Like

Sometimes they time out. It happens! :slight_smile:
I was going to say, I just ran my code in jupyter and had no issues.

I had the same problem. Solving it when running each cells again from the top. If you don’t run first your defined variable of paintings in task 1 you will get the error in task 3.