shichao-an / twitter-photos

Simple, fast command-line tool to get photos from Twitter accounts
https://twitter-photos.shichao.io
BSD 2-Clause "Simplified" License
171 stars 39 forks source link

TypeError: 'Media' object has no attribute '__getitem__'? #7

Open ghost opened 8 years ago

ghost commented 8 years ago

hi, whenever i try to run this progam i get this error

[mindcrime@PowerSlave home]$ twphotos -u wired Retrieving photos from Twitter API... Traceback (most recent call last): File "/usr/bin/twphotos", line 9, in load_entry_point('twitter-photos==0.2.0', 'console_scripts', 'twphotos')() File "/usr/lib/python2.7/site-packages/twphotos/photos.py", line 274, in main twphotos.get() File "/usr/lib/python2.7/site-packages/twphotos/photos.py", line 77, in get num=self.num) File "/usr/lib/python2.7/site-packages/twphotos/photos.py", line 102, in load if m['type'] == 'photo': TypeError: 'Media' object has no attribute 'getitem'

should i be using python 3 or is regular python ok?

juanchorossi commented 8 years ago

+1

shichao-an commented 8 years ago

Hi, @botgod and @juanchorossi,

I created a new release v0.3.0 to PyPI. It should fix the issue. Can you reinstall it and try again?

pip install -U twitter-photos