labrad/pylabrad

Cannot connect with tls_mode='on'

DanielSank opened this issue · 1 comments

In [4]: cxn = labrad.connect(host='computername.domain.edu', tls_mode='on')
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-4abc5b13e0a1> in <module>()
----> 1 cxn = labrad.connect(host='computername.domain.edu', tls_mode='on')

/usr/local/google/home/danielsank/.virtualenvs/labrad/local/lib/python2.7/site-packages/labrad/__init__.pyc in connect(host, port, name, **kw)
     22 def connect(host=constants.MANAGER_HOST, port=None, name=None, **kw):
     23     """Create a client connection to the labrad manager."""
---> 24     cxn = backend.connect(host=host, port=port, name=name, **kw)
     25     return client.Client(cxn)
     26 

/usr/local/google/home/danielsank/.virtualenvs/labrad/local/lib/python2.7/site-packages/labrad/backend.pyc in connect(host, port, name, timeout, **kw)
     84     thread.startReactor()
     85     future = concurrent.call_future(getConnection, host, port, name, **kw)
---> 86     cxn = future.result(timeout=timeout)
     87 
     88     return TwistedConnection(cxn)

/usr/local/google/home/danielsank/.virtualenvs/labrad/local/lib/python2.7/site-packages/concurrent/futures/_base.pyc in result(self, timeout)
    427                 raise CancelledError()
    428             elif self._state == FINISHED:
--> 429                 return self.__get_result()
    430             else:
    431                 raise TimeoutError()

/usr/local/google/home/danielsank/.virtualenvs/labrad/local/lib/python2.7/site-packages/concurrent/futures/_base.pyc in __get_result(self)
    379             else:
    380                 exception_type = type(self._exception)
--> 381             raise exception_type, self._exception, self._traceback
    382         else:
    383             return self._result

AttributeError: LabradProtocol instance has no attribute 'manager_features'

I think this is happening because I'm connecting to a legacy manager. If so, the exception message should suggest this.