Skip to content

Commit

Permalink
Fixed UnicodeDecodeError (#1316)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
che3000 and che3000 authored Jun 16, 2023
1 parent e0eda1c commit 8f08832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f08832

Please sign in to comment.