Problem scenario
You are trying to run a Python program with a class. You get this message:
File “foobar.py”, line 11, in
class Building(param1, param2):
NameError: name ‘param1’ is not defined
What should you do?
Solution
Use the word “object” instead of one or more parameters that you are passing in the parentheses () of the class.
…
Continue reading “How Do You Troubleshoot the Python Error “NameError: name ” is not defined”?”