From 64414b61588c22d1d6861335adaeac68d708632c Mon Sep 17 00:00:00 2001 From: HarJIT Date: Sat, 13 Mar 2021 13:03:19 +0000 Subject: [PATCH] Fix TypeError when reading playlist files. --- ipod-shuffle-4g.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipod-shuffle-4g.py b/ipod-shuffle-4g.py index f3aca4d..12d1860 100755 --- a/ipod-shuffle-4g.py +++ b/ipod-shuffle-4g.py @@ -534,7 +534,7 @@ class Playlist(Record): text = os.path.splitext(os.path.basename(filename))[0] else: # Read the playlist file - with open(filename, 'rb') as f: + with open(filename, 'r', errors="replace") as f: data = f.readlines() extension = os.path.splitext(filename)[1].lower()