[GH-ISSUE #581] [BUG] UnicodeDecodeError #369

Closed
opened 2026-02-25 20:35:34 +03:00 by kerem · 1 comment
Owner

Originally created by @moghk1 on GitHub (Dec 18, 2021).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/581

After installing whoogle with pip, and trying to run whoogle-search --help, I keep getting this:

Traceback (most recent call last):
  File "c:\users\moghk\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\moghk\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\moghk\AppData\Local\Programs\Python\Python39\Scripts\whoogle-search.exe\__main__.py", line 4, in <module>
  File "c:\users\moghe\appdata\local\programs\python\python39\lib\site-packages\app\__init__.py", line 47, in <module>
    app.config['TRANSLATIONS'] = json.load(open(
  File "c:\users\moghk\appdata\local\programs\python\python39\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "c:\users\moghk\appdata\local\programs\python\python39\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 10756: character maps to <undefined>

Whenever I type in any whoogle-search command it returns with that. What is happening and how can I fix it?

Originally created by @moghk1 on GitHub (Dec 18, 2021). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/581 After installing whoogle with pip, and trying to run `whoogle-search --help`, I keep getting this: ``` Traceback (most recent call last): File "c:\users\moghk\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\moghk\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\moghk\AppData\Local\Programs\Python\Python39\Scripts\whoogle-search.exe\__main__.py", line 4, in <module> File "c:\users\moghe\appdata\local\programs\python\python39\lib\site-packages\app\__init__.py", line 47, in <module> app.config['TRANSLATIONS'] = json.load(open( File "c:\users\moghk\appdata\local\programs\python\python39\lib\json\__init__.py", line 293, in load return loads(fp.read(), File "c:\users\moghk\appdata\local\programs\python\python39\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 10756: character maps to <undefined> ``` Whenever I type in any `whoogle-search` command it returns with that. What is happening and how can I fix it?
kerem 2026-02-25 20:35:34 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@DUOLabs333 commented on GitHub (Dec 19, 2021):

Ok, it seems that Windows does not use UTF-8 by default, but CP1252. So, the fix would probably be to manually specify utf-8 when decoding.

<!-- gh-comment-id:997480027 --> @DUOLabs333 commented on GitHub (Dec 19, 2021): Ok, it seems that Windows does not use `UTF-8` by default, but `CP1252`. So, the fix would probably be to manually specify `utf-8` when decoding.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#369
No description provided.