Python Forum
Error in Int object is not subscript-able. How to debug this ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in Int object is not subscript-able. How to debug this ?
#1
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
#2
please show code and (complete and unmodified) error message in bbcode tags.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  no debug messages going into log file robertkwild 0 930 Jul-09-2024, 05:30 PM
Last Post: robertkwild
  error in class: TypeError: 'str' object is not callable akbarza 2 2,848 Dec-30-2023, 04:35 PM
Last Post: deanhystad
  Need help with 'str' object is not callable error. Fare 4 3,254 Jul-23-2023, 02:25 PM
Last Post: Fare
  pycharm debug help mg24 1 2,192 Nov-18-2022, 05:38 AM
Last Post: deanhystad
  Python debug suddenly got bad ben1122 3 2,372 Sep-03-2022, 06:20 AM
Last Post: ben1122
  Error in Int object is not subscript-able. kakut 2 2,427 Jul-06-2022, 08:31 AM
Last Post: ibreeden
  How can I find the value of k(subscript t+1) for periods t=1...50? maeva 2 2,755 Nov-07-2021, 07:59 AM
Last Post: maeva
Bug Help Debug please jamesaarr 12 7,291 Jul-28-2021, 11:20 PM
Last Post: Pedroski55
Star Type Error: 'in' object is not callable nman52 3 5,279 May-01-2021, 11:03 PM
Last Post: nman52
  how to solve "a bytes-like object is required, not 'str'" error maiya 2 6,932 Jul-28-2020, 07:03 PM
Last Post: bowlofred

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.