Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unacceptable character #x1f44b: special characters are not allowed in "<unicode string>" #270

Closed
butaca opened this issue May 18, 2020 · 3 comments

Comments

@butaca
Copy link

butaca commented May 18, 2020

yamllint 1.23.0
Python 3.5.3
Raspbian GNU/Linux 9 (stretch)

Traceback (most recent call last):
  File "/usr/local/bin/yamllint", line 10, in <module>
    sys.exit(run())
  File "/usr/local/lib/python3.5/dist-packages/yamllint/cli.py", line 186, in run
    no_warn=args.no_warnings)
  File "/usr/local/lib/python3.5/dist-packages/yamllint/cli.py", line 92, in show_problems
    for problem in problems:
  File "/usr/local/lib/python3.5/dist-packages/yamllint/linter.py", line 198, in _run
    syntax_error = get_syntax_error(buffer)
  File "/usr/local/lib/python3.5/dist-packages/yamllint/linter.py", line 179, in get_syntax_error
    list(yaml.parse(buffer, Loader=yaml.BaseLoader))
  File "/usr/local/lib/python3.5/dist-packages/yaml/__init__.py", line 35, in parse
    loader = Loader(stream)
  File "/usr/local/lib/python3.5/dist-packages/yaml/loader.py", line 14, in __init__
    Reader.__init__(self, stream)
  File "/usr/local/lib/python3.5/dist-packages/yaml/reader.py", line 74, in __init__
    self.check_printable(stream)
  File "/usr/local/lib/python3.5/dist-packages/yaml/reader.py", line 144, in check_printable
    'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x1f44b: special characters are not allowed
  in "<unicode string>", position 7

Example file (utf-8)

---
m: 👋

@L-U-C-K-Y
Copy link

Facing the same issues with emojis in the filename.

@adrienverge
Copy link
Owner

@butaca isn't it a duplicate of #48? Can you check the version of PyYAML you have?

@butaca
Copy link
Author

butaca commented May 27, 2020

Another package forced an older version of PyYAML 🤦‍♂️
Updating PyYAML fixed the issue, sorry for the noise.

@butaca butaca closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants