Running Stem With Tor Gives "process Terminated: Timed Out"
While trying to run Stem's To Russia With Love example, I am getting the following error: ~$ python practice.py Starting Tor: Traceback (most recent call last): File 'practice.
Solution 1:
It might be failing because you are missing the GeoIP database which is required to use an exit node from a specific country.
Try removing the 'ExitNodes': '{ru}',
line from the python script, or since you're on Ubuntu, try sudo apt-get install tor-geoipdb
and see if that helps get the connection up and running.
Since it takes time to build the circuits, you can try increasing the timeout a bit as well (though this probably isn't why its failing).
tor_process = stem.process.launch_tor_with_config(
#tor_cmd = '/usr/bin/tor',
timeout = 300,
config = {
'SocksPort': str(SOCKS_PORT),
# 'ExitNodes': '{ru}',
'DataDir': '/tmp/tor',
'Log': [
'NOTICE file /tmp/tor.notice.log',
'ERR file /tmp/tor.log',
],
},
init_msg_handler = print_bootstrap_lines,
)
Post a Comment for "Running Stem With Tor Gives "process Terminated: Timed Out""