I've pulled the last version from git and installed twython.
Here is my script and the result when I launch it:
# -*- coding: utf-8 -*-
import twython
""" Instantiate Tango with no Authentication """
twitter = twython.setup(username="<removed>", password="<removed>")
timeline = twitter.getUserTimeline()
for machin in timeline:
twitter.destroyStatus(int(machin['id']))
examples roland$ python search_results.py
Traceback (most recent call last):
File "search_results.py", line 5, in <module>
twitter = twython.setup(username="<removed>", password="<removed>")
AttributeError: 'module' object has no attribute 'setup'
Frederic
Le 29-août-09 à 08:02, Ryan McGrath a écrit :
Thank you very much !
Now it's going a bit further. It crash with the following message:
twython roland$ python search_results.py
Traceback (most recent call last):
File "search_results.py", line 8, in <module>
twitter.destroyStatus(int(machin['id']))
File "/Users/roland/Development/twitter/twython/twython.py", line
490, in destroyStatus
return simplejson.load(self.opener.open("http://twitter.com/status/destroy/
%s.json", "POST" % id))
TypeError: not all arguments converted during string formatting
I have simplejson installed but when I do python setup.py install on
twython I get an error related to json and a wrong release number.
Could that be related ?
How did you installed json ?
Frédéric
Le 31-août-09 à 01:05, Kulbir Saini a écrit :
Hi Kulbir,
Thank you very much !
Now it's going a bit further. It crash with the following message:
twython roland$ python search_results.pyFile "search_results.py", line 8, in <module>
Traceback (most recent call last):File "/Users/roland/Development/twitter/twython/twython.py", line 490, in destroyStatus
twitter.destroyStatus(int(machin['id']))
return simplejson.load(self.opener.open("http://twitter.com/status/destroy/%s.json", "POST" % id))
I think you meant
return
simplejson.load(self.opener.open("http://twitter.com/status/destroy/
%s.json" % id, "POST"))
which is working for me.
Now I can hit the APILimit rather quickly.
Is anyone on the list know how quick twitter answer api limit lift
request ?
Frédéric
Le 31-août-09 à 01:26, Kulbir Saini a écrit :
> Hi Frederic,
>
> <twython.patch><twython.py>
Hi Kulbir,
I think you meant
return simplejson.load(self.opener.open("http://twitter.com/status/destroy/%s.json" % id, "POST"))
which is working for me.
Now I can hit the APILimit rather quickly.
Is anyone on the list know how quick twitter answer api limit lift request ?
Frédéric
Le 31-août-09 à 01:26, Kulbir Saini a écrit :
Hi Frederic,
Thats not your fault. Thats a bug in twython. I think Ryan should apply the attached patch to git tree.
For the time being you have two options.
1. Apply the attached patch to your twython.py
2. Download the attached twython.py and replace your twython.py with it.
2009/8/31 Frédéric Roland <fro...@gmail.com>
Hi Kulbir,
Thank you very much !
Now it's going a bit further. It crash with the following message:
twython roland$ python search_results.py
Traceback (most recent call last):
File "search_results.py", line 8, in <module>
twitter.destroyStatus(int(machin['id']))
File "/Users/roland/Development/twitter/twython/twython.py", line 490, in destroyStatus
return simplejson.load(self.opener.open("http://twitter.com/status/destroy/%s.json", "POST" % id))
<twython.patch><twython.py>