TheDataLeek / Eris-Cogs

Cogs for Red Discord Bot
Other
9 stars 13 forks source link

[Facts] Can't Load Cog #52

Closed Menteroth closed 1 year ago

Menteroth commented 2 years ago
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>
TheDataLeek commented 2 years ago

Hi! What version of python are you using?

Menteroth commented 2 years ago

3.9.9.

Doxidclout commented 1 year ago

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

TheDataLeek commented 1 year ago

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

TheDataLeek commented 1 year ago

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