Python Forum
Error in Int object is not subscript-able.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in Int object is not subscript-able.
#1
How to debug this ?

for j in range(len(index)):
        if index[j] < i:
            line_id = humid[index[j]][i] - 1
        else:
            line_id = humid[i][index[j]] - 1
                                              ## index =[2] len(index) =1
                                              ## humid= [[0, 1, 0, 0], [0, 0, 2, 0], [0, 0, 0, 3], [0, 0, 0, 0]] 
 
-----------------------------------------------------------------------------------
     25     for j in range(len(index)):
     26         if index[j] < i:
---> 27             humid= humid[2][i] - 1
     28         else:
     29             humid= humid[i][index[j]] - 1
 
TypeError: 'int' object is not subscriptable
Reply


Messages In This Thread
Error in Int object is not subscript-able. - by kakut - Jul-06-2022, 06:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help with 'str' object is not callable error. Fare 4 890 Jul-23-2023, 02:25 PM
Last Post: Fare
  How can I find the value of k(subscript t+1) for periods t=1...50? maeva 2 1,591 Nov-07-2021, 07:59 AM
Last Post: maeva
Star Type Error: 'in' object is not callable nman52 3 3,454 May-01-2021, 11:03 PM
Last Post: nman52
  Error in Int object is not subscript-able. How to debug this ? yanDvator 1 2,253 Aug-03-2020, 02:28 PM
Last Post: Larz60+
  word subscript Staph 1 1,812 Mar-31-2020, 10:21 AM
Last Post: buran
  Sympy error "object is not callable" Cupcake 0 4,950 Feb-08-2020, 02:22 AM
Last Post: Cupcake
  object is not subscriptable... Error Message? Shafla 3 11,954 Sep-25-2019, 12:27 AM
Last Post: buran
  Getting error "Type error-a bytes-like object..." mrapple2020 1 5,439 Apr-06-2019, 06:37 PM
Last Post: mrapple2020
  Error ' Attribute error: 'str' object has no attribute 'items'' in pyinstaller manhnt 2 8,972 Nov-04-2018, 05:51 PM
Last Post: Larz60+
  'module' object is not subscriptable error Pengwain 3 15,995 Jul-08-2018, 02:04 PM
Last Post: Pengwain

Forum Jump:

User Panel Messages

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