• PyYaml - Не могу загрузить строку из yaml, что делать?

    @BrenLike Автор вопроса
    Консоль:
    test.py:4: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    yaml.load(f)
    Traceback (most recent call last):
    File "test.py", line 4, in
    yaml.load(f)
    File "C:\Users\Гриша\AppData\Local\Programs\Python\Python38-32\lib\site-packages\yaml\__init__.py", line 112, in load
    loader = Loader(stream)
    File "C:\Users\Гриша\AppData\Local\Programs\Python\Python38-32\lib\site-packages\yaml\loader.py", line 24, in __init__
    Reader.__init__(self, stream)
    File "C:\Users\Гриша\AppData\Local\Programs\Python\Python38-32\lib\site-packages\yaml\reader.py", line 85, in __init__
    self.determine_encoding()
    File "C:\Users\Гриша\AppData\Local\Programs\Python\Python38-32\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
    self.update_raw()
    File "C:\Users\Гриша\AppData\Local\Programs\Python\Python38-32\lib\site-packages\yaml\reader.py", line 178, in update_raw
    data = self.stream.read(size)
    File "C:\Users\Гриша\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1251.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 426: character maps to

    Код:
    import yaml
    
    with open('config.yaml', 'r') as f:
        yaml.load(f)
  • Почему не запускается бот на discord.py?

    @BrenLike Автор вопроса
    Не помогло, ошибка та же