#this error msg from python 2.7
>>> import stem
>>> from stem.control import Controller
>>> with Controller.from_port ( port = 9051 ) as controller:
controller.authenticate ( )
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
with Controller.from_port ( port = 9051 ) as controller:
File "/usr/lib/python2.7/dist-packages/stem/control.py", line 659, in from_port
control_port = stem.socket.ControlPort(address, port)
File "/usr/lib/python2.7/dist-packages/stem/socket.py", line 314, in __init__
self.connect()
File "/usr/lib/python2.7/dist-packages/stem/socket.py", line 187, in connect
self._socket = self._make_socket()
File "/usr/lib/python2.7/dist-packages/stem/socket.py", line 343, in _make_socket
raise stem.SocketError(exc)
SocketError: [Errno 111] Connection refused