Python Forum
TypeError: 'int' object is not iterable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: 'int' object is not iterable
#1
my question here

I was trying to execute the below code and it is throwing the error 'int object is not iterable'

Code:
def populatelivelist(self):
    print('POPULATING LIVE DATA INTO live_skillgroups_parent_list')
    for live_row in self.live_cursor:
        live_agent_id = str(live_row[0])
        live_skillgroup_refURL = str(live_row[1])
        live_skillgroup_name = str(live_row[2])
        #live_timestamp = str(live_row[2])
        self.live_skillgroups_parent_list.append(live_agent_id + ',' + live_skillgroup_refURL+','+live_skillgroup_name)
    print('live_skillgroups_parent_list: ', len(self.live_skillgroups_parent_list))
Reply
#2
It looks like self.live_cursor is an integer not an iterable object - list, tuple, dictionary, set, or some generator.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: cannot pickle ‘_asyncio.Future’ object Abdul_Rafey 1 383 Mar-07-2024, 03:40 PM
Last Post: deanhystad
  error in class: TypeError: 'str' object is not callable akbarza 2 504 Dec-30-2023, 04:35 PM
Last Post: deanhystad
Bug TypeError: 'NoneType' object is not subscriptable TheLummen 4 738 Nov-27-2023, 11:34 AM
Last Post: TheLummen
  TypeError: 'NoneType' object is not callable akbarza 4 987 Aug-24-2023, 05:14 PM
Last Post: snippsat
  [NEW CODER] TypeError: Object is not callable iwantyoursec 5 1,346 Aug-23-2023, 06:21 PM
Last Post: deanhystad
  TypeError: 'float' object is not callable #1 isdito2001 1 1,075 Jan-21-2023, 12:43 AM
Last Post: Yoriz
  TypeError: a bytes-like object is required ZeroX 13 4,089 Jan-07-2023, 07:02 PM
Last Post: deanhystad
  TypeError: 'float' object is not callable TimofeyKolpakov 3 1,437 Dec-04-2022, 04:58 PM
Last Post: TimofeyKolpakov
  API Post issue "TypeError: 'str' object is not callable" makeeley 2 1,905 Oct-30-2022, 12:53 PM
Last Post: makeeley
  TypeError: 'NoneType' object is not subscriptable syafiq14 3 5,250 Sep-19-2022, 02:43 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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