ThriftParserError: ThriftPy does not support generating module with path in protocol 'd'
2017-08-30 13:36
597 查看
使用python连接hive,在
from impala.dbapi import connect 语句报如下错误:
ThriftParserError: ThriftPy does not support generating module with path in protocol 'd'
定位到 D:\Anaconda3\Lib\site-packages\thriftpy\parser\parser.py的
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))
命令行使用python -m py_comile parser.py 进行编译,即可
from impala.dbapi import connect 语句报如下错误:
ThriftParserError: ThriftPy does not support generating module with path in protocol 'd'
定位到 D:\Anaconda3\Lib\site-packages\thriftpy\parser\parser.py的
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))
命令行使用python -m py_comile parser.py 进行编译,即可
相关文章推荐
- happybase1.0 报错:ThriftPy does not support generating module with path in protocol 'd'
- import happybase报错,ThriftPy does not support generating module with path in protocol 'd'
- Error: The version of SQL Server in use does not support datatype 'datetime2'
- 在eclipse中运行pygraphviz 错误(ValueError: Program dot not found in path.)
- webpack打包遇到locals[0] does not appear to be a `module` object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using `env` section in Babel configuration
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- AS 中报错:Error:(22, 0) Project with path ':library' could not be found in project ':indict
- mysql connect Error,Client does not support authentication protocol requested
- Error: The version of SQL Server in use does not support datatype 'datetime2
- This version does not support documents saved in the Xcode 8 format. Open this document with Xcode 8
- ERROR: The version of SQL Server in use does not support datatype 'datetime2'.
- Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported run
- OpenCV Error: The function/feature is not implemented (OpenCV was built without SURF support) in cvE
- Error - xcrun: error: unable to find utility “xcodebuild”, not a developer tool or in PATH
- 关于ORA-02070:database xxx does not support operator USERENV in this context
- The server does not support version 3.0 of the J2EE Web module specification
- How to deal with "Could not find component on update server. Contact VMware Support or your system administrator." in Vmware.