On Wed, May 27, 2015, at 19:51, Karthik Sharma wrote: > I get the following error. > > Traceback (most recent call last): > File "test_json.py", line 23, in <module> > print('message {} \n\n'.format(message['Message'])) > TypeError: list indices must be integers, not str > karthik.sharma@aukksharma2:~$ vim test_json.py
The string in data appears to be a json _list_ (note the first character is a square bracket) - try message[0]['Message']. You should really be able to figure this out yourself. -- https://mail.python.org/mailman/listinfo/python-list