python 连接impala报错(windows系统)

来源:互联网 发布:oppor11t网络切换破解 编辑:程序博客网 时间:2024/06/05 03:00

错误

ThriftParserError: ThriftPy does not support generating module with path in protocol 'd' 

看anaconda安装在哪个盘,就会报错‘d’或者‘e’。

原因:

路径不对。
定位到 D:\Anaconda3\Lib\site-packages\thriftpy\parser\parser.py
的,第487行修改。

 if url_scheme == '':        with open(path) as fh:            data = fh.read()    elif url_scheme in ('http', 'https'):        data = urlopen(path).read()    else:        raise ThriftParserError('ThriftPy does not support generating module '                                'with path in protocol \'{}\''.format(                                    url_scheme))

修改为

  if url_scheme == '':        with open(path) as fh:            data = fh.read()    elif url_scheme in ('c', 'd','e','f''):        with open(path) as fh:            data = fh.read()    elif url_scheme in ('http', 'https'):        data = urlopen(path).read()    else:        raise ThriftParserError('ThriftPy does not support generating module '                                'with path in protocol \'{}\''.format(                                    url_scheme))
原创粉丝点击