From a27d1afef91f69ca2ee2614c214208f7fafa5e4b Mon Sep 17 00:00:00 2001 From: mohamad qodosi Date: Sat, 27 Jun 2020 14:47:04 +0430 Subject: [PATCH] fix endless loop in python3 --- hazm/WikipediaReader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hazm/WikipediaReader.py b/hazm/WikipediaReader.py index 635a73bd..d84d8a55 100644 --- a/hazm/WikipediaReader.py +++ b/hazm/WikipediaReader.py @@ -19,7 +19,7 @@ def docs(self): doc_pattern = re.compile(r'') doc = [] - for line in iter(proc.stdout.readline, ''): + for line in iter(proc.stdout.readline, b''): line = line.strip().decode('utf8') if line: doc.append(line)