需要您的帮助!我阅读了我在互联网上找到的所有文档(StackOverflow,Github等),但没有任何帮助。我试图通过python从PC连接到hive(hue),我的脚本是:
当我运行此代码时,我收到此错误消息:
Traceback (most recent call last):
File "C:/Users/myuser/Documents/Python/testing.py", line 6, in <module>
cursor = hive.connect('myconnect', port=10000, username='root').cursor()
File "C:\Users\myuser\AppData\Local\Continuum\anaconda3\lib\site-packages\pyhive\hive.py", line 94,
in connect
return Connection(*args, **kwargs)
File "C:\Users\myuser\AppData\Local\Continuum\anaconda3\lib\site-packages\pyhive\hive.py", line
192, in __init__self._transport.open()File
"C:\Users\myuser\AppData\Local\Continuum\anaconda3\lib\site-packages\thrift_sasl\__init__.py", line
79, in open message=("Could not start SASL: %s" % self.sasl.getError()))
thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start
(-4) SASL(-4): no mechanism available: Unable to find a callback: 2'
我的系统详细信息:OS:Windows 10专业版Python版本:Python 3.7.4分发:Anaconda,Inc.在win32上
我找到了解决此问题的方法。已采取的措施:
我的结论是我的问题是由于安全(我不是工作站的管理员)和Windows问题引起的。