Answer the question
In order to leave comments, you need to log in
How to parse info from qiwi api Python?
I need to display data by keys, but I can’t figure out how to parse them correctly.
(requests).
The basic commands are correct (I hope):
get = requests.get(apiurl, headers=auth)
get.encoding = 'utf-8'
trans = (get.text)
data = json.loads(trans)
Answer the question
In order to leave comments, you need to log in
In python, KeyError usually occurs when you try to get a value from a dictionary given a key that is not in it. There, before the KeyError itself, there should be something like
File "", line 1, in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question