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
Manuskript does not start with PyEnchant on MacOS #188
Comments
Thanks @katafrakt for providing extra details with this report, especially the sample code and output. This problem looks like something we should at least be able to work around. It is also similar to issue #130 which caused a crash when the locale environment variables LANG and LANGUAGE were not set in Linux. Is there a way in OS X to access the language setting directly instead of using |
Is this in the package you made, or even running from source? The simplest fix would be to use the first of Can you run that simple script and see if that works? from PyQt5.QtCore import QLocale
print(QLocale.system().name()) # Should return something like: en_US |
It's in both: the package with PyEnchant included and from source. I also tried running after setting Your script returns "en_US", as you expected:
So I took liberty to edit
After that, Manuskript starts normally. |
Great, do you want to make a pull request? Or do you want me to make the change? But before that, I'm just thinking: what would happen if If that's the case, it's a bug, and it might be better to select randomly a dict in |
@olivierkes
So probably it should be secured against it too. I can try to work on a pull request later today or tomorrow. EDIT: After re-reading the trace, I think it's a different problem than just spellcheck. |
@katafrakt It's a different problem indeed, and this one is fixed (at least ignored) with commit 0a0649a. So now how does pyEnchant behave? |
FYI: I think that issue 130 - Crashing when creating a new project is similar to this issue as it has to do with a missing locale. |
It is similar, but the error message is different:
Maybe #130 does behave differently with previous commit ? |
The error message is indeed different. Fortunately there is an easy workaround to #130 -- set LANG to a valid locale. |
@olivierkes Now it behaves like you predicted:
So I think I know more or less everything to create a pull request. |
This happens with PyEnchant enabled on MacOS.
Brief investigation indicates that this is because PyEnchant cannot detect default language. In fact, when running a simple script:
The result is:
The text was updated successfully, but these errors were encountered: