po5 / mpv_sponsorblock

mpv script to skip sponsored segments of YouTube videos
GNU General Public License v3.0
531 stars 29 forks source link

TypeError: the JSON object must be str, not 'bytes' #33

Open g4570n opened 3 years ago

g4570n commented 3 years ago

Hi, I have the latest version of the script and I get this error in the terminal:

[sponsorblock] Traceback (most recent call last):
[sponsorblock]   File "/home/g4570n/.config/mpv/scripts/sponsorblock_shared/sponsorblock.py", line 34, in <module>
[sponsorblock]     segments = json.load(response)
[sponsorblock]   File "/usr/lib/python3.5/json/__init__.py", line 268, in load
[sponsorblock]     parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
[sponsorblock]   File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
[sponsorblock]     s.__class__.__name__))
[sponsorblock] TypeError: the JSON object must be str, not 'bytes'

I have these versions installed:

mpv 0.23.0
Python 3.5.4