Python Forum
If statement variable not defined
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statement variable not defined
#3
(Sep-03-2018, 02:24 PM)ichabod801 Wrote: 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.

This worked thanks

Is there a way i can condense the if/elif month statements ?
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 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 368 Mar-28-2024, 02:13 PM
Last Post: Larz60+
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 639 Nov-23-2023, 02:53 PM
Last Post: rob101
  Printing the variable from defined function jws 7 1,422 Sep-03-2023, 03:22 PM
Last Post: deanhystad
  [variable] is not defined error arises despite variable being defined TheTypicalDoge 4 2,209 Apr-05-2022, 04:55 AM
Last Post: deanhystad
  An IF statement with a List variable dedesssse 3 8,433 Jul-08-2021, 05:58 PM
Last Post: perfringo
  define a variable using an if statement Margaridalopes 2 2,212 Oct-24-2020, 05:47 PM
Last Post: jefsummers
  Function will not return variable that I think is defined Oldman45 6 3,594 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,335 Aug-12-2020, 10:34 PM
Last Post: snippsat
  Variable not defined Heyjoe 4 2,616 Jul-10-2020, 11:27 PM
Last Post: Heyjoe
  python library not defined in user defined function johnEmScott 2 3,923 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