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

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -