Traceback (most recent call last):
File "C:\Python27\trend_timeline.py", line 19, in
trends = json.dumps(t.trends(), indent=1)
File "C:\Documents and Settings\Zanzamar\Datos de programa\Python\Python27\site-packages\twitter\api.py", line 165, in call
return self._handle_response(req, uri, arg_data)
File "C:\Documents and Settings\Zanzamar\Datos de programa\Python\Python27\site-packages\twitter\api.py", line 180, in _handle_response
raise TwitterHTTPError(e, uri, self.format, arg_data)
TwitterHTTPError: Twitter sent status 404 for URL: 1/trends.json using parameters: ()
details: <!DOCTYPE html>
Are you running the actual code that is currently checked into GitHub or did you type it in out of the text that's printed in the paper book? I ask because the line of code that is causing the stack trace in your note above ( trends = json.dumps(t.trends(), indent=1) ) is nowhere in the file that you are citing (
), which was updated because of Twitter changing their API on this particular call.
I believe the solution to the problem you are mentioning in this particular case (which was also alluded to in your Amazon review) may be that you just need to re-checkout or freshen your checkout.
Give this a whirl and let me know if it helps. I'll leave the issue open for now until you verify that you can get this script to run.
At this point in time, the entire repo https://github.com/ptwobrussell/Recipes-for-Mining-Twitter needs updating for Twitter v1.1 compatibility, so I'm going to close this issue because I think it may have since been resolved, but is effectively moot at this point even if it's not. Please keep an eye on the Recipes-for-Mining-Twitter repository for updates if you're interested in using that code. Thanks.
I'm trying to run the code written here: https://github.com/ptwobrussell/Recipes-for-Mining-Twitter/blob/master/recipe__get_search_results_for_trending_topic.py
And get this:
Traceback (most recent call last): File "C:\Python27\trend_timeline.py", line 19, in
trends = json.dumps(t.trends(), indent=1)
File "C:\Documents and Settings\Zanzamar\Datos de programa\Python\Python27\site-packages\twitter\api.py", line 165, in call
return self._handle_response(req, uri, arg_data)
File "C:\Documents and Settings\Zanzamar\Datos de programa\Python\Python27\site-packages\twitter\api.py", line 180, in _handle_response
raise TwitterHTTPError(e, uri, self.format, arg_data)
TwitterHTTPError: Twitter sent status 404 for URL: 1/trends.json using parameters: ()
details: <!DOCTYPE html>
Sorry, that page doesn’t exist!
Thanks for noticing—we're going to fix it up and have things back to normal soon.
Are you running the actual code that is currently checked into GitHub or did you type it in out of the text that's printed in the paper book? I ask because the line of code that is causing the stack trace in your note above ( trends = json.dumps(t.trends(), indent=1) ) is nowhere in the file that you are citing (
), although it used to be there in an earlier revision (see
), which was updated because of Twitter changing their API on this particular call.I believe the solution to the problem you are mentioning in this particular case (which was also alluded to in your Amazon review) may be that you just need to re-checkout or freshen your checkout.
Give this a whirl and let me know if it helps. I'll leave the issue open for now until you verify that you can get this script to run.
At this point in time, the entire repo https://github.com/ptwobrussell/Recipes-for-Mining-Twitter needs updating for Twitter v1.1 compatibility, so I'm going to close this issue because I think it may have since been resolved, but is effectively moot at this point even if it's not. Please keep an eye on the Recipes-for-Mining-Twitter repository for updates if you're interested in using that code. Thanks.