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

NVDA fails to start if Windows is set to an unsupported/impossible locale #8726

Closed
bramd opened this issue Sep 8, 2018 · 7 comments
Closed

NVDA fails to start if Windows is set to an unsupported/impossible locale #8726

bramd opened this issue Sep 8, 2018 · 7 comments

Comments

@bramd
Copy link
Contributor

@bramd bramd commented Sep 8, 2018

Steps to reproduce:

  1. Set Windows region/language settings as follows:
  • Region/country: Netherlands
  • Date/time/number format: English
  • Interface language: English
  1. Start NVDA

Actual behavior:

  • NVDA fails to start

Expected behavior:

  • NVDA starts normally either with the selected NVDA language or with a fallback to the Windows interface language or English

System configuration:

NVDA Installed/portable/running from source:

  • Installed

NVDA version:

  • alpha-15976,8d33d238

Windows version:

  • Windows 10

Other questions:

Does the issue still occur after restarting your PC?

  • Yes

Have you tried any other versions of NVDA?

  • No
@bramd
Copy link
Contributor Author

@bramd bramd commented Sep 8, 2018

The problem seems to be that there is no error handling at nvda.pyw line 29, which calls setlocale with an empty string to set it to the system locale. If the system ends up being configured with an impossible setting such as en-nl this fails.

Loading

@leonardder
Copy link
Collaborator

@leonardder leonardder commented Sep 8, 2018

Hmm, I believe I have the same settings (display language and date/time format English UK, country the Netherlands. Still it seems to work fine here.

In the windows 10 language settings, what languages do you have available? Only English, or Dutch as well? Dutch is my default app language, while English is below Dutch in the list and is set as display language.

Loading

@bramd
Copy link
Contributor Author

@bramd bramd commented Sep 8, 2018

Loading

@leonardder
Copy link
Collaborator

@leonardder leonardder commented Sep 8, 2018

This looks serious enough for a p2.

Loading

@michaelDCurran
Copy link
Member

@michaelDCurran michaelDCurran commented Dec 6, 2018

I cannot seem to reproduce this. Do we know what exception is being thrown by SetLocale? Also, even if we do catch this, do other things fail after that point?

Loading

@leonardder
Copy link
Collaborator

@leonardder leonardder commented Feb 25, 2019

I can now reproduce this reliably. It is pretty annoying, so I will take this one.

Loading

@pluma
Copy link

@pluma pluma commented Mar 27, 2019

This seems to have been what was preventing me from installing NVDA at all. When running the installer I get "an error has occured" right after the logo and this shows up in the log file (which gets deleted when the dialog is closed, btw, so this took me a while to hunt down):

Traceback (most recent call last):
  File "nvda.pyw", line 29, in <module>
  File "locale.pyo", line 581, in setlocale
locale.Error: unsupported locale setting

I'm in Germany, Windows is set to "English (Germany)". Switching to "English (United States)" allowed me to run the installer normally.

Loading

@nvaccessAuto nvaccessAuto added this to the 2019.1 milestone Mar 28, 2019
@michaelDCurran michaelDCurran removed this from the 2019.1 milestone Mar 31, 2019
@michaelDCurran michaelDCurran added this to the 2019.2 milestone Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants