Python Forum
string indices must be integers when parsing Json
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string indices must be integers when parsing Json
#4
(Mar-10-2022, 08:34 AM)ilknurg Wrote: Traceback (most recent call last):  File "wmi_deneme.py", line 121, in <module>    print(d["Name"])TypeError: string indices must be integers

Guessing-Mode: The object, you're trying to access, is not a dict. Instead, it's a list. To get elements from a list, an Integer is required. Just try to get the first Element 0 from the list.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: string indices must be integers when parsing Json - by DeaD_EyE - Mar-10-2022, 11:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Parsing large JSON josvink66 5 716 Jan-10-2024, 05:46 PM
Last Post: snippsat
  tuple indices must be integers or slices, not str cybertooth 16 11,770 Nov-02-2023, 01:20 PM
Last Post: brewer32
  No matter what I do I get back "List indices must be integers or slices, not list" Radical 4 1,236 Sep-24-2023, 05:03 AM
Last Post: deanhystad
  boto3 - Error - TypeError: string indices must be integers kpatil 7 1,316 Jun-09-2023, 06:56 PM
Last Post: kpatil
  [split] Parse Nested JSON String in Python mmm07 4 1,584 Mar-28-2023, 06:07 PM
Last Post: snippsat
  Response.json list indices must be integers or slices, not str [SOLVED] AlphaInc 4 6,503 Mar-24-2023, 08:34 AM
Last Post: fullytotal
  "TypeError: string indices must be integers, not 'str'" while not using any indices bul1t 2 2,076 Feb-11-2023, 07:03 PM
Last Post: deanhystad
  Error "list indices must be integers or slices, not str" dee 2 1,494 Dec-30-2022, 05:38 PM
Last Post: dee
  TypeError: string indices must be integers JonWayn 12 3,515 Aug-31-2022, 03:29 PM
Last Post: deanhystad
  Parsing JSON pyStund 4 3,059 Jul-31-2022, 02:02 PM
Last Post: pyStund

Forum Jump:

User Panel Messages

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