Python Forum
If statement variable not defined
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statement variable not defined
#2
Neither your if nor your elif trigger, so you never actually define Online_Status, and when you start checking the month, that's when you get the error.

The problem is {Status}. That makes a set containing Status, which is not equal to Status. Get rid of the curly braces on lines 26 and 28, and see how that works.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
If statement variable not defined - by MTom5 - Sep-03-2018, 01:52 PM
RE: If statement variable not defined - by ichabod801 - Sep-03-2018, 02:24 PM
RE: If statement variable not defined - by MTom5 - Sep-03-2018, 02:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Variable not defined even though it is CoderMerv 3 444 Mar-28-2024, 02:13 PM
Last Post: Larz60+
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 689 Nov-23-2023, 02:53 PM
Last Post: rob101
  Printing the variable from defined function jws 7 1,541 Sep-03-2023, 03:22 PM
Last Post: deanhystad
  [variable] is not defined error arises despite variable being defined TheTypicalDoge 4 2,311 Apr-05-2022, 04:55 AM
Last Post: deanhystad
  An IF statement with a List variable dedesssse 3 8,650 Jul-08-2021, 05:58 PM
Last Post: perfringo
  define a variable using an if statement Margaridalopes 2 2,251 Oct-24-2020, 05:47 PM
Last Post: jefsummers
  Function will not return variable that I think is defined Oldman45 6 3,671 Aug-18-2020, 08:50 PM
Last Post: deanhystad
  How to assign a module to a variable even if it's not defined? mandaxyz 5 3,411 Aug-12-2020, 10:34 PM
Last Post: snippsat
  Variable not defined Heyjoe 4 2,647 Jul-10-2020, 11:27 PM
Last Post: Heyjoe
  python library not defined in user defined function johnEmScott 2 3,984 May-30-2020, 04:14 AM
Last Post: DT2000

Forum Jump:

User Panel Messages

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