cloudera / impyla

Python DB API 2.0 client for Impala and Hive (HiveServer2 protocol)
Apache License 2.0
731 stars 248 forks source link

AttributeError: 'TBufferedTransport' object has no attribute 'trans' #235

Closed crazy2323 closed 7 years ago

crazy2323 commented 7 years ago

conn = connect(host='my host', port=10000, database=db, auth_mechanism='NOSASL') cur = conn.cursor() File "/usr/local/python27/lib/python2.7/site-packages/impala/hiveserver2.py", line 125, in cursor session = self.service.open_session(user, configuration) File "/usr/local/python27/lib/python2.7/site-packages/impala/hiveserver2.py", line 995, in open_session resp = self._rpc('OpenSession', req) File "/usr/local/python27/lib/python2.7/site-packages/impala/hiveserver2.py", line 923, in _rpc response = self._execute(func_name, request) File "/usr/local/python27/lib/python2.7/site-packages/impala/hiveserver2.py", line 940, in _execute return func(request) File "/usr/local/python27/lib/python2.7/site-packages/impala/_thrift_gen/TCLIService/TCLIService.py", line 175, in OpenSession return self.recv_OpenSession() File "/usr/local/python27/lib/python2.7/site-packages/impala/_thrift_gen/TCLIService/TCLIService.py", line 193, in recv_OpenSession result.read(self._iprot) File "/usr/local/python27/lib/python2.7/site-packages/impala/_thrift_gen/TCLIService/TCLIService.py", line 1109, in read fastbinary.decode_binary(self, iprot.trans, (self.class, self.thrift_spec)) AttributeError: 'TBufferedTransport' object has no attribute 'trans'

is anybody help me?

czxm commented 7 years ago

Please try below to fix this issue by enforcing thrift-0.9.3: pip install thrift=0.9.3

https://github.com/cloudera/impyla/issues/234

crazy2323 commented 7 years ago

it works well done thx @czxm !

mingzhou commented 7 years ago

it works for me. thanks @czxm !

tdhopper commented 7 years ago

Is there a reason not to pin it here until this is fixed?

wesm commented 7 years ago

No reason. Can someone make a PR?

tdhopper commented 7 years ago

@wesm Yes.

qinzl1 commented 7 years ago

perfect fix my problem