Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

UnicodeDecodeError: 'gbk' codec can't decode... When running run_demo.py #52

Open
BruceDai003 opened this issue Aug 29, 2018 · 2 comments

Comments

@BruceDai003
Copy link

BruceDai003 commented Aug 29, 2018

I didn't change anything and simply run the run_demo.py script. And I noticed that when running the Flask app served on localhost:8080, in the static_file_large(path), when the program is openning some *.png or *.jpg files, e.g. black.png, shadow.png, shinaya.jpg, with open("ui/large/" + path).read() statement, this error popped up,
UnicodeDecodeError: 'gbk' codec can't decode byte 0x92 in position 30: illegal multibyte sequence.
I think this open statement only works with those *.js files in the ui/large/ path, not working when reading picture files. Any workaround here?

I tried from PIL import Image and use Image.open() to load the images, but doesn't work.

@xixiU
Copy link

xixiU commented Apr 2, 2019

same to me?how do U solve the problem?

@Matt-Kou
Copy link

I met the same issue... did you resolve the problem?

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

No branches or pull requests

3 participants