TheDataLeek/Eris-Cogs

[Facts] Can't Load Cog

Closed this issue · 5 comments

Exception during loading of package
Traceback (most recent call last):
  File "C:\Discord\Bot\redenv\lib\site-packages\redbot\core\core_commands.py", line 172, in _load
    await bot.load_extension(spec)
  File "C:\Discord\Bot\redenv\lib\site-packages\redbot\core\bot.py", line 1563, in load_extension
    lib.setup(self)
  File "C:\Discord\Bot\Soundwave\cogs\CogManager\cogs\facts\__init__.py", line 5, in setup
    bot.add_cog(Fact(bot))
  File "C:\Discord\Bot\Soundwave\cogs\CogManager\cogs\facts\facts.py", line 21, in __init__
    self.bearfacts: List[str] = (data_dir / "bearfacts.txt").read_text().split("\n")
  File "C:\Python39\lib\pathlib.py", line 1267, in read_text
    return f.read()
  File "C:\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 0x9d in position 5690: character maps to <undefined>

Hi! What version of python are you using?

3.9.9.

Hey there, were you able to get this fixed? would it fix the issue by installing an odler version of python? I cant load any of the cogs

I've had trouble replicating this issue, I'm going to manually add the encoding on these files and that will hopefully solve it!

Let me know if you still have problems and we can reopen the issue!