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

Error running on macOS #46

Open
LuiFerreiraD opened this issue Apr 3, 2023 · 1 comment
Open

Error running on macOS #46

LuiFerreiraD opened this issue Apr 3, 2023 · 1 comment
Assignees
Labels
tag: important type: bug Something isn't working type: internal Internal issue
Milestone

Comments

@LuiFerreiraD
Copy link

Hi,
I am trying to use the package, but unfortunately I am encountering an error when importing it.
When calling the "from .lexicon import Lex", there's an error in the LOCALE setting.
LOCALE = locale.getdefaultlocale()[0].replace("_", "-"), but my macOS returns (None, 'UTF8') to the "locale.getdefaultlocale()" call. The error is as follows:
"AttributeError: 'NoneType' object has no attribute 'replace'"
I see in the documentation of "Client" that it has the option to be None, so I think this was considered in the client.py but not on the lexicon.

The fix should be easy, it think: LOCALE = locale.getdefaultlocale()[0].replace("_", "-") if locale.getdefaultlocale()[0] else None

@frissyn
Copy link
Owner

frissyn commented Apr 4, 2023

@LuiFerreiraD I not 100% sure, but it might be an issue with not being able to access environment variables, or some other means of determining your system's locale. I'll add a check for this in the next day or so though, thanks for reporting!

@frissyn frissyn self-assigned this Apr 4, 2023
@frissyn frissyn added type: bug Something isn't working tag: important type: internal Internal issue labels Apr 4, 2023
@frissyn frissyn added this to the v1.1.x milestone Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: important type: bug Something isn't working type: internal Internal issue
Projects
None yet
Development

No branches or pull requests

2 participants