Python Forum
"Name is not defined" when running a class
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Name is not defined" when running a class
#6
If you have made the change, the error now does not match the code
print(self.question)
does not match
Error:
File "C:\Users/Lenovo/Documents/Python/Examples_book\survey.py", line 13, in show_question print(question)
As stated above did you make sure you saved survey after making the changes?
Reply


Messages In This Thread
RE: "Name is not defined" when running a class - by Yoriz - Jan-12-2023, 11:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  super() and order of running method in class inheritance akbarza 7 2,627 Feb-04-2024, 09:35 AM
Last Post: Gribouillis
  Why built in functions are defined as class? quazirfan 5 4,315 Oct-23-2021, 01:20 PM
Last Post: Gribouillis
  Error when refering to class defined in 'main' in an imported module HeRo 2 3,369 Apr-13-2021, 07:22 PM
Last Post: HeRo
  Class function is not running at all even though it is clearly run in the code SheeppOSU 2 3,738 Sep-26-2020, 10:54 PM
Last Post: SheeppOSU
  Running scripts and location of saved interpreted user-defined classes and functions leodavinci1990 3 3,488 Aug-25-2020, 03:43 AM
Last Post: micseydel
  "Class already defined" while using typings. DreamingInsanity 0 3,031 Aug-19-2020, 10:43 AM
Last Post: DreamingInsanity
  python library not defined in user defined function johnEmScott 2 5,151 May-30-2020, 04:14 AM
Last Post: DT2000
  Python complains that class instance is not defined colt 3 7,926 Sep-17-2019, 12:32 AM
Last Post: ichabod801
  NameError: name 'display' is not defined when running code on power bi beginner1 2 22,458 Jul-24-2019, 11:03 AM
Last Post: beginner1
  saving (in text or binary) an object under a defined class cai0824 3 4,033 May-12-2019, 08:55 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020