Python Forum
Getting Index Error - list index out of range
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Index Error - list index out of range
#2
Is it possible that
def rest_types_buttons():
    buttons = wd.find_elements_by_xpath('//span[@class="zred"]')
    return buttons
indexes from 1 and not 0? If that is the case then in button[0].click() the 0 would be out of range. Try changing it to a 1 and see what happens. That's my best guess.
Reply


Messages In This Thread
RE: Getting Index Error - list index out of range - by michael1789 - Feb-03-2020, 06:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Grouping in pandas/multi-index data frame Aleqsie 3 695 Jan-06-2024, 03:55 PM
Last Post: deanhystad
  Merging rows and adding columns based on matching index pythonnewbie78 3 830 Dec-24-2023, 11:51 AM
Last Post: Pedroski55
  Index out of range error standenman 0 1,103 May-22-2023, 10:35 PM
Last Post: standenman
  multi index issue of one hot encoder preprocessing aupres 0 1,086 Jun-10-2022, 11:23 AM
Last Post: aupres
  IndexError: invalid index to scalar variable. jyotib2610 3 3,109 Mar-10-2022, 09:55 AM
Last Post: jyotib2610
  Inverted Index thewal 0 1,342 Feb-10-2022, 03:54 PM
Last Post: thewal
  IndexError: index 0 is out of bounds for axis 0 with size 0 atomxkai 2 5,500 Mar-03-2021, 08:26 AM
Last Post: atomxkai
  [split] Getting Index Error - list index out of range krishna 2 2,625 Jan-09-2021, 08:29 AM
Last Post: buran
  Interpolating DataFrame method=‘index’ help tlewick1 1 1,865 Oct-22-2020, 12:48 AM
Last Post: scidam
  Cycle through Numpy range within another range(?) Zero01 0 2,028 Jul-31-2020, 02:37 PM
Last Post: Zero01

Forum Jump:

User Panel Messages

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