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

Reporting crashes when trying to get the locale #20

Open
joaoasrosa opened this issue Oct 22, 2019 · 3 comments
Open

Reporting crashes when trying to get the locale #20

joaoasrosa opened this issue Oct 22, 2019 · 3 comments

Comments

@joaoasrosa
Copy link

After I install all the dependencies, and use a virtual environment, when trying to generate a report (chaos report) I have the following problem:

Warning: entry point could not be loaded. Contact its author for help.


Traceback (most recent call last):
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/click_plugins/core.py", line 37, in decorator
    group.add_command(entry_point.load())
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/chaosreport/__init__.py", line 16, in <module>
    import cairosvg
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/__init__.py", line 42, in <module>
    from . import surface  # noqa isort:skip
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/surface.py", line 28, in <module>
    from .defs import (
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/defs.py", line 24, in <module>
    from .bounding_box import calculate_bounding_box, is_non_empty_bounding_box
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/bounding_box.py", line 26, in <module>
    from .features import match_features
  File "/Users/joaorosa/.venvs/chaostk/lib/python3.7/site-packages/cairosvg/features.py", line 25, in <module>
    LOCALE = locale.getdefaultlocale()[0] or ''
  File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 568, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 495, in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8

What extra configuration is needed for the locale?

@Lawouach
Copy link
Contributor

Hey,

I can only assume that the UTF-8 locale isn't installed by default on your machine. I don't think our code makes an explicit requirement for it but one of the dependency seems to.

Seems to be an old bug in Python that has been fixed recently:

https://bugs.python.org/issue18378

I don't own a Mac so I don't know how it could be deployed.

@joaoasrosa
Copy link
Author

Hey,
Thanks. And you triggered me.
The solution that I used was: https://coderwall.com/p/-k_93g/mac-os-x-valueerror-unknown-locale-utf-8-in-python .

Given that I'm not a python expert, the guidance was helpful.

I will do a PR for the documentation.

joaoasrosa added a commit to joaoasrosa/chaostoolkit-reporting that referenced this issue Oct 22, 2019
joaoasrosa added a commit to joaoasrosa/chaostoolkit-reporting that referenced this issue Oct 22, 2019
@Lawouach
Copy link
Contributor

awesome, thanks

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

2 participants