Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError #25

Open
JiewenZhao opened this issue Dec 23, 2019 · 2 comments
Open

UnicodeDecodeError #25

JiewenZhao opened this issue Dec 23, 2019 · 2 comments

Comments

@JiewenZhao
Copy link

JiewenZhao commented Dec 23, 2019

I hava an error while running the hico.py. The error message as follow:
data = pickle.load(open(os.path.join(self.root, '{}.p'.format(sequence_id)), 'rb'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 14: ordinal not in range(128)

@CamilleMaurice
Copy link

CamilleMaurice commented Jun 17, 2020

I'm having the same problem.
edit: you should add ", encoding='bytes')"

pickle.load(open(os.path.join(self.root, '{}.p'.format(sequence_id)), 'rb'), encoding='bytes')

@Zhang-Zhaoji
Copy link

or use encoding = 'latin1'), which would directly get a string while 'bytes' would generate a python2 style 'byte' variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants