Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Who agreed with this topic

Python Error 'TSaslClientTransport' object has no attribute 'trans' when openning cursor to Impala


Hi ,

using Ubuntu 14.0.4 and 16.0.4 unable to work with Impala via Python .


Installed :


pip install impyla

apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

pip install thrift_sasl
pip install sasl


thrift version install :

thrift (0.10.0)
thrift-sasl (0.2.1)

impyla (0.14.0)


The Example Code


from impala.dbapi import connect
conn = connect(host="", port="25003", user="user", password='pass', auth_mechanism='PLAIN')

print "Connected Successfully"

cur = conn.cursor()



stack error :


Traceback (most recent call last):
  File "/home/alon/PycharmProjects/test/", line 6, in <module>
    cur = conn.cursor()
  File "/usr/local/lib/python2.7/dist-packages/impala/", line 125, in cursor
    session = self.service.open_session(user, configuration)
  File "/usr/local/lib/python2.7/dist-packages/impala/", line 995, in open_session
    resp = self._rpc('OpenSession', req)
  File "/usr/local/lib/python2.7/dist-packages/impala/", line 923, in _rpc
    response = self._execute(func_name, request)
  File "/usr/local/lib/python2.7/dist-packages/impala/", line 940, in _execute
    return func(request)
  File "/usr/local/lib/python2.7/dist-packages/impala/_thrift_gen/TCLIService/", line 175, in OpenSession
    return self.recv_OpenSession()
  File "/usr/local/lib/python2.7/dist-packages/impala/_thrift_gen/TCLIService/", line 193, in recv_OpenSession
  File "/usr/local/lib/python2.7/dist-packages/impala/_thrift_gen/TCLIService/", line 1109, in read
    fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
AttributeError: 'TSaslClientTransport' object has no attribute 'trans'


dont know what is going wrong here .







Who agreed with this topic