Skip to content

Commit 9098204

Browse files
committed
Fixing error TypeError: decode() argument 'encoding'
1 parent 934d412 commit 9098204

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/ask.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ def do_search(self):
6464
except Exception as e:
6565
print(e)
6666
sys.exit(4)
67-
67+
68+
if r.encoding is None:
69+
r.encoding = 'UTF-8'
70+
6871
self.results = r.content.decode(r.encoding)
6972
self.totalresults += self.results
7073

0 commit comments

Comments
 (0)