You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/Users/someone/Documents/code/pycharm/test/venv/lib/oython3.6/site-packages/thriftpy2/parser/ init py", line 33, in load
include_dir=include_dir)
File "/Users/someone/Documents/code/oycharm/test/venv/lib/oython3.6/site-packaaes/thriftoy2/oarser/oarser.py", line 577, in parse data = fh.read ()
File "/Users/someone/.pyenv/versions/3.6.0/lib/python3.6/encodinqs/ascii.py'", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte @xe6 in position 113: ordinal not in range(128)
prboblematic code in parser.py:
url_scheme = urlparse(path).scheme
if url_scheme == 'file':
with open(urlparse(path).netloc + urlparse(path).path) as fh:
data = fh.read()
elif len(url_scheme) <= 1:
with open(path) as fh:
data = fh.read()
elif url_scheme in ('http', 'https'):
data = urlopen(path).read()
else:
raise ThriftParserError('thriftpy2 does not support generating module '
'with path in protocol \'{}\''.format(
url_scheme))
Possible solution:
check if python2 or python3, py3 supports open(encoding=xxx), py2 could use io.open
The text was updated successfully, but these errors were encountered:
prboblematic code in parser.py:
Possible solution:
check if python2 or python3, py3 supports open(encoding=xxx), py2 could use io.open
The text was updated successfully, but these errors were encountered: