How to put info from qiwi api Python?

Need to get data for the keys but can't figure out how to parse them.
(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)


No matter how trying, get a KeyError.
https://developer.qiwi.com/ru/qiwi-wallet-personal...
June 7th 19 at 14:49
1 answer
June 7th 19 at 14:51
In python KeyError usually appears when trying to retrieve a value from a dictionary by key, which it is not. There before the actual KeyError should be something of type
File "", line 1, in

In this line, and must be a mistake
PS: throw another code of the program and the execution result, the atoms do not quite understand the problem
why? - Ma commented on June 7th 19 at 15:12
It gives an error in the line where you are trying to display, the problem is that it is not clear how to deduce, for example data[].sum and sum.amount, data[].comment > https://developer.qiwi.com/ru/qiwi-wallet-personal... - Krystal_Tromp commented on June 7th 19 at 14:54
from what I understand you needdata[].sum.amount - Ma commented on June 7th 19 at 14:57
, 5a994930d2ef8511784896.png5a99493944662296371082.png5a99493e5e156668264476.png - Krystal_Tromp commented on June 7th 19 at 15:00
study the basics of working with data structures in python. Well, next time, insert such information by text, not the picture - Garnett_Deckow commented on June 7th 19 at 15:03
Try print(data[].sum.amount) - Ma commented on June 7th 19 at 15:06
you also need to learn the fundamentals of data structures in python - Garnett_Deckow commented on June 7th 19 at 15:09
because even I do not understand why, start to explain the meaning of this design - data[] - Garnett_Deckow commented on June 7th 19 at 15:15
And, similarly, casually looked, thanks for the comment, I will look - Ma commented on June 7th 19 at 15:18
further there is also error - Garnett_Deckow commented on June 7th 19 at 15:21
can show what exactly? - Ma commented on June 7th 19 at 15:24
getting value by key from dict is not exactly through the point going on, that's basic python - Garnett_Deckow commented on June 7th 19 at 15:27
, of course, I won't copy-paste from the site - Ma commented on June 7th 19 at 15:30

Find more questions by tags PythonQiwiJSONAPI