dropbox / dropbox/PyHive

TSaslClientTransport' object has no attribute 'readAll'

Open
#281 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

Hi

I see this issue in the log, butI did not see/understand the solution or workaround.
Now I am using anaconda3 windows and getting this issue.

I am using pyhive 0.6.1
python 3.7.1
thrift-sasl 0.2.1
thrift 0.10.0
pure-transport 0.1.3

Here is the code

import puretransport
from pyhive import hive
transport = puretransport.transport_factory(host='host.dns.com',port=10000,username='chelika2000',password='pwd9')
hive_con = hive.connect(username='chelika2000', thrift_transport=transport,database='cust')
cursor = hive_con.cursor()
cursor.execute("show tables")
for table in cursor.fetchall():
print (table)

Getting this error

C:\ProgramData\Anaconda3\lib\site-packages\pyhive\hive.py in connect(*args, **kwargs)
92 :returns: a :py:class:`Connection` object.
93 """
---> 94 return Connection(*args, **kwargs)
95
96

C:\ProgramData\Anaconda3\lib\site-packages\pyhive\hive.py in __init__(self, host, port, username, database, auth, configuration, kerberos_service_name, password, thrift_transport)
196 username=username,
197 )
--> 198 response = self._client.OpenSession(open_session_req)
199 _check_status(response)
200 assert response.sessionHandle is not None, "Expected a session from OpenSession"

C:\ProgramData\Anaconda3\lib\site-packages\TCLIService\TCLIService.py in OpenSession(self, req)
185 """
186 self.send_OpenSession(req)
--> 187 return self.recv_OpenSession()
188
189 def send_OpenSession(self, req):

C:\ProgramData\Anaconda3\lib\site-packages\TCLIService\TCLIService.py in recv_OpenSession(self)
197 def recv_OpenSession(self):
198 iprot = self._iprot
--> 199 (fname, mtype, rseqid) = iprot.readMessageBegin()
200 if mtype == TMessageType.EXCEPTION:
201 x = TApplicationException()

C:\ProgramData\Anaconda3\lib\site-packages\thrift\protocol\TBinaryProtocol.py in readMessageBegin(self)
132
133 def readMessageBegin(self):
--> 134 sz = self.readI32()
135 if sz < 0:
136 version = sz & TBinaryProtocol.VERSION_MASK

C:\ProgramData\Anaconda3\lib\site-packages\thrift\protocol\TBinaryProtocol.py in readI32(self)
215
216 def readI32(self):
--> 217 buff = self.trans.readAll(4)
218 val, = unpack('!i', buff)
219 return val

AttributeError: 'TSaslClientTransport' object has no attribute 'readAll'

Any help appreciated

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.