-
json parsing 오류카테고리 없음 2021. 4. 4. 01:06
www.a-ha.io/questions/4f55b969f928ab4eb112aa5aaee79547
파이썬에서 json 인덱싱에 어려움을 겪고있어 질문드립니다. ㅜㅜ | 전문 지식 검색은 아하!
프로그래밍, Error, json, python, indexing - response = requests.get( url, headers=headers) match=response.json() print(match) print("_____") print(type(match)) print("_____") match =json.dumps(match) print(type(match)) print("_____") match = json.load
www.a-ha.io
print(data['item']['aucSeNm']) 검색했을 때 TypeError: list indices must be integers or slices, not str error 발생
->print(data['item'][0]['aucSeCode'])로 수정
인덱싱 에러가 배열관련이기 때문
반응형