python - Cannot work with Stem and Tor -


i want work tor through stem module.the following code connected tor:

import sys stem.connection import connect  if __name__ == '__main__':     controller = connect()      if not controller:         sys.exit(1)  # unable connection      print 'tor running version %s' % controller.get_version()     controller.close() 

however, following error when running code:unable connect tor. sure it's running?

i turned on tor , tested code again , nothing happened. problem line:

if __name__ == '__main__':     controller = connect() 

even if enter connect() method python interpreter error. error , how can fix it?


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -