qq_34188442 2017-04-26 08:51 采纳率: 100%
浏览 3845
已采纳

python执行cursor = conn.cursor()报错

在执行cursor = conn.cursor()报错
图片说明

Traceback (most recent call last):
File "mid_tables.py", line 17, in
cursor= conn.cursor()
File "/usr/lib/python2.6/site-packages/impala/hiveserver2.py", line 125, in cursor
session = self.service.open_session(user, configuration)
File "/usr/lib/python2.6/site-packages/impala/hiveserver2.py", line 995, in open_session
resp = self._rpc('OpenSession', req)
File "/usr/lib/python2.6/site-packages/impala/hiveserver2.py", line 923, in rpc
response = self._execute(func_name, request)
File "/usr/lib/python2.6/site-packages/impala/hiveserver2.py", line 940, in _execute
return func(request)
File "/usr/lib/python2.6/site-packages/impala/_thrift_gen/TCLIService/TCLIService.py", line 175, in OpenSession
return self.recv_OpenSession()
File "/usr/lib/python2.6/site-packages/impala/_thrift_gen/TCLIService/TCLIService.py", line 193, in recv_OpenSession
result.read(self._iprot)
File "/usr/lib/python2.6/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'

  • 写回答

4条回答 默认 最新

  • oyljerry 2017-04-26 09:05
    关注
     pip install thrift=0.9.3
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 请把下列每一行代码完整地读懂并注释出来
  • ¥15 pycharm运行main文件,显示没有conda环境
  • ¥15 易优eyoucms关于二级栏目调用的问题
  • ¥15 寻找公式识别开发,自动识别整页文档、图像公式的软件
  • ¥15 为什么eclipse不能再下载了?
  • ¥15 编辑cmake lists 明明写了project项目名,但是还是报错怎么回事
  • ¥15 关于#计算机视觉#的问题:求一份高质量桥梁多病害数据集
  • ¥15 特定网页无法访问,已排除网页问题
  • ¥50 如何将脑的图像投影到颅骨上
  • ¥15 提问一个关于vscode相关的环境配置问题,就是输入中文但是显示不出来,代码在idea可以显示中文,但在vscode不行,不知道怎么配置环境