Fixed UnicodeDecodeError (#1316)

* Update image.py

use encoding="utf8", in line303, 413, 524, 803, 1459
fix UnicodeDecodeError: 'cp950' codec can't decode byte 0x83 in position 52: illegal multibyte sequence

* Update image.py

fix : ValueError: binary mode doesn't take an encoding argument

---------

Co-authored-by: Ching-Yuan Huang <47504492+che610369@users.noreply.github.com>
This commit is contained in:
Ching-Yuan Huang 2023-06-16 22:30:05 +08:00 committed by GitHub
parent e0eda1cf80
commit 8f08832c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -800,7 +800,7 @@ def count_frames(filename, fast=False):
process = subprocess.Popen(cmd,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE,
universal_newlines=True)
universal_newlines=True, encoding="utf8")
pbar = None
duration = None
init_tqdm = False