I am working on loading a list of emoji characters in a simple python 3.6 script. The YAML structure is essentially as follows:
- 🙂
- 😁
- 😬
My python script looks like this:
import yaml
f = open('emojis.yml')
EMOJIS = yaml.load(f)
f.close()
I get the following exception:
yaml.reader.ReaderError: unacceptable character #x001d: special characters are not allowed in "emojis.yml", position 2
I saw a parameter allow_unicode=True, but it seems to be available only for yaml.dump. It seems like people had problems with similar problems in Python2, but since all lines must be unicode, it's hard for me to understand why this is not working.
emojis "tag: yaml.org, 2002: str". , -, - , yaml lib emoji . , emoji .
yaml, emojis PyYAML?