Defect found in search_results.py #22

Closed
opened 2010-10-28 20:55:57 -07:00 by EugeneLiang · 2 comments
EugeneLiang commented 2010-10-28 20:55:57 -07:00 (Migrated from github.com)

Hi,
I found the following defect while running search_results.py in core_examples :

Traceback (most recent call last):
File "search_results.py", line 5, in
search_results = twitter.searchTwitter(q="WebsDotCom", rpp="50")
File "/usr/local/lib/python2.6/dist-packages/twython-1.3.3-py2.6.egg/twython/twython.py", line 267, in searchTwitter
searchURL = Twython.constructApiURL("http://search.twitter.com/search.json", kwargs) + "&" + urllib.urlencode({"q": Twython.unicode2utf8(search_query)})
TypeError: constructApiURL() takes exactly 3 arguments (2 given)

May I know what other arguments am I required to enter?

Hi, I found the following defect while running search_results.py in core_examples : Traceback (most recent call last): File "search_results.py", line 5, in <module> search_results = twitter.searchTwitter(q="WebsDotCom", rpp="50") File "/usr/local/lib/python2.6/dist-packages/twython-1.3.3-py2.6.egg/twython/twython.py", line 267, in searchTwitter searchURL = Twython.constructApiURL("http://search.twitter.com/search.json", kwargs) + "&" + urllib.urlencode({"q": Twython.unicode2utf8(search_query)}) TypeError: constructApiURL() takes exactly 3 arguments (2 given) May I know what other arguments am I required to enter?
EugeneLiang commented 2010-10-28 21:10:04 -07:00 (Migrated from github.com)

Hello, I think i found a fix to the issue.

Change "search_query" on line 267 of twython.py to "kwargs".

this will get search_results.py working

Hello, I think i found a fix to the issue. Change "search_query" on line 267 of twython.py to "kwargs". this will get search_results.py working
ryanmcgrath commented 2010-10-28 21:33:22 -07:00 (Migrated from github.com)

Hey,

This should be fixed and out now (pushed out Twython 1.3.4, should be on Pypi as well). Your fix technically works, yes, but in reality search_query should've been removed anyway. I did that and consolidated some other stuff, fixing two other bugs in the process.

Let me know if you find anything else!

  • Ryan
Hey, This should be fixed and out now (pushed out Twython 1.3.4, should be on Pypi as well). Your fix technically works, yes, but in reality search_query should've been removed anyway. I did that and consolidated some other stuff, fixing two other bugs in the process. Let me know if you find anything else! - Ryan
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: code/twython#22
No description provided.