Changes between Initial Version and Version 4 of Ticket #9003


Ignore:
Timestamp:
Jun 15, 2013, 10:12:27 PM (6 years ago)
Author:
atagar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9003

    • Property Status changed from new to accepted
    • Property Priority changed from normal to minor
    • Property Summary changed from Crash stem tutorial in ExitNodes to Twitter example uses deprecated 1.0 API
  • Ticket #9003 – Description

    initial v4  
    1 I installed stem from pip
    2 Python 2.7.3
    3 Fedora 18
    4 I am running the example To russia with love to reading twitter, i cp & paste code then run as tutorial says and get this output:
    5 
     1Our example for [https://stem.torproject.org/tutorials/to_russia_with_love.html#reading-twitter reading Twitter feeds] uses the 1.0 version of the Twitter API. This API has [https://dev.twitter.com/blog/api-v1-is-retired now been deprecated] and queries fail with...
    62
    73{{{
    8 [ovnicraft@hphome test_stem]$ python tor_twitter.py
     4{"errors": [{
     5  "message": "The Twitter REST API v1 is no longer
     6              active. Please migrate to API v1.1.
     7              https://dev.twitter.com/docs/api/1.1/overview.",
     8  "code": 68
     9}]}
     10}}}
     11
     12This causes our example to fail with...
     13
     14{{{
     15atagar@morrigan:~/Desktop/stem$ python twitter_script
    916Traceback (most recent call last):
    10   File "tor_twitter.py", line 32, in <module>
    11     'ExitNodes': '{ru}',
    12   File "/usr/lib/python2.7/site-packages/stem/process.py", line 259, in launch_tor_with_config
    13     return launch_tor(tor_cmd, args, torrc_path, completion_percent, init_msg_handler, timeout, take_ownership)
    14   File "/usr/lib/python2.7/site-packages/stem/process.py", line 155, in launch_tor
    15     raise OSError("Process terminated: %s" % last_problem)
    16 OSError: Process terminated: No, it's still there.  Exiting.
     17  File "twitter_script", line 39, in <module>
     18    print "%i. %s" % (index + 1, tweet["created_at"])
     19TypeError: string indices must be integers
     20}}}
    1721
    18 }}}
     22Patches welcome for migrating the example to the 1.1 API!