Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loop issue
#3
(Feb-26-2018, 07:58 AM)Gribouillis Wrote: What happens when you print dic? Are there three 'active' values?

Hi Gribouillis

Thanks for reply

Yes, there are 2 active and one inactive node in that json data...

What I feel that program is not going into below loop
if count != 3:
for key2, value2 in dic.items():
if value2 != 'active':
key2 = (key1 + ': !!!Alert!!! ' + key2 + ' is unhealthy ')
failed_node = key2
msg_text = (CB_message + failed_node + 'Failed')

and I did this program using pycharm gui and how the below it says
local variable msg_text value is not used something like warning...
for below line of code
msg_text = (CB_message + failed_node + 'Failed')

am i doing something wrong in looping ?
Reply


Messages In This Thread
Loop issue - by onenessboy - Feb-26-2018, 06:45 AM
RE: Loop issue - by Gribouillis - Feb-26-2018, 07:58 AM
RE: Loop issue - by onenessboy - Feb-26-2018, 08:56 AM
RE: Loop issue - by Gribouillis - Feb-26-2018, 09:53 AM
RE: Loop issue - by onenessboy - Feb-26-2018, 12:13 PM
RE: Loop issue - by onenessboy - Feb-26-2018, 03:22 PM
RE: Loop issue - by Gribouillis - Feb-26-2018, 03:55 PM
RE: Loop issue - by onenessboy - Feb-26-2018, 06:32 PM
RE: Loop issue - by Gribouillis - Feb-26-2018, 07:02 PM
RE: Loop issue - by onenessboy - Feb-27-2018, 05:39 AM
RE: Loop issue - by Gribouillis - Feb-27-2018, 07:16 AM
RE: Loop issue - by onenessboy - Mar-03-2018, 08:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  For List Loop Issue Galdain 2 2,118 Dec-31-2019, 04:53 AM
Last Post: Galdain
  issue with updating list every iteration of a loop ftrillaudp 2 3,133 Oct-29-2018, 03:23 AM
Last Post: ftrillaudp
  while loop issue, help please? itmustbebunnies 6 3,086 Oct-25-2018, 07:22 AM
Last Post: itmustbebunnies
  for-loop issue digysol 2 2,140 Oct-24-2018, 06:12 PM
Last Post: nilamo
  Issue with my 'roll the dice simulation'-exercise (cannot break out of the loop) Placebo 2 3,567 Sep-30-2018, 01:19 PM
Last Post: Placebo
  while loop issue - stuck in the loop! EricMichel 6 8,706 Aug-06-2018, 03:59 PM
Last Post: EricMichel
  While loop issue CWatters 4 3,863 Sep-25-2017, 08:58 PM
Last Post: nilamo
  Code issue with time remaining loop. Python3 deboerdn2000 11 8,932 May-04-2017, 04:53 PM
Last Post: deboerdn2000

Forum Jump:

User Panel Messages

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