From f1db86bdc9e6cfe94178c9551f018dc6ba2569a1 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 12 Jul 2022 03:02:18 -0400 Subject: [PATCH] [19] fix imdb genres --- VERSION | 2 +- modules/imdb.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 03ba0f34..4e9e816c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.1-develop18 +1.17.1-develop19 diff --git a/modules/imdb.py b/modules/imdb.py index 38bf4a24..36dbf236 100644 --- a/modules/imdb.py +++ b/modules/imdb.py @@ -215,11 +215,11 @@ class IMDb: with gzip.open(gz, "rb") as f_in: shutil.copyfileobj(f_in, f_out) - with open(tsv, "r") as t: + with open(tsv, "r", encoding="utf-8") as t: if interface == "ratings": data = {line[0]: line[1] for line in csv.reader(t, delimiter="\t")} elif interface == "basics": - data = {line[0]: str(line[-1]).split(",") for line in csv.reader(tsv, delimiter="\t")} + data = {line[0]: str(line[-1]).split(",") for line in csv.reader(t, delimiter="\t")} else: data = [line for line in csv.reader(t, delimiter="\t")]