buckk / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

help #207

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

>>> f=open('TweetFormat.txt','r')
>>> for line in f:
...     try:
...             a=eval(line[0:-2],{})
...     except SyntaxError:
...             continue
...     print a['favorited']
...
Traceback (most recent call last):
  File "<stdin>", line 6, in <module>
TypeError: tuple indices must be integers, not str

What is the problem with this code?

Original issue reported on code.google.com by shahabsh...@gmail.com on 16 Aug 2011 at 1:42