Skip to content

Commit

Permalink
Fix encoding error when reading YouTube channels
Browse files Browse the repository at this point in the history
  • Loading branch information
goggle committed Apr 23, 2022
1 parent d56366b commit a33a3cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/srgssr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ def _read_youtube_channels(self, fname):
fname -- the path to the file to be read
"""
data_file = os.path.join(xbmc.translatePath(self.data_uri), fname)
with open(data_file, 'r') as f:
with open(data_file, 'r', encoding='utf-8') as f:
ch_content = json.load(f)
cids = [elem['channel'] for elem in ch_content.get('channels', [])]
return cids
Expand Down

0 comments on commit a33a3cb

Please sign in to comment.