Skip to content

Commit

Permalink
Fixing error TypeError: decode() argument 'encoding'
Browse files Browse the repository at this point in the history
  • Loading branch information
nashjb committed Oct 31, 2024
1 parent 934d412 commit 9098204
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/ask.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def do_search(self):
except Exception as e:
print(e)
sys.exit(4)


if r.encoding is None:
r.encoding = 'UTF-8'

self.results = r.content.decode(r.encoding)
self.totalresults += self.results

Expand Down

0 comments on commit 9098204

Please sign in to comment.