[SOLVED] Why do I keep on getting the error "name 'amazon_soup' is not defined"

Issue

enter image description here

Not sure why I am getting the error?

Solution

Since you have the amazon_soup used as an argument to the method and you use it as a variable which is undefined.

It should be:

print(getnextpage(geturl(amazon_url)))

The amazon_soup variable you have declared is local to the method geturl.

Answered By – Opal

Answer Checked By – Cary Denson (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *