Skip to content

Commit 330b133

Browse files
committed
Fixing error TypeError: decode() argument 'encoding' must be str, not None
1 parent 934d412 commit 330b133

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/ask.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def do_search(self):
6464
except Exception as e:
6565
print(e)
6666
sys.exit(4)
67-
68-
self.results = r.content.decode(r.encoding)
67+
68+
self.results = r.content.decode(r.encoding if r.encoding else 'utf-8')
6969
self.totalresults += self.results
7070

7171
def process(self):

0 commit comments

Comments
 (0)