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

Comments

@bramd
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

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.

@leonardder

This comment has been minimized.

Copy link
Collaborator

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.

@bramd

This comment has been minimized.

Copy link
Contributor Author

commented Sep 8, 2018

@leonardder

This comment has been minimized.

Copy link
Collaborator

commented Sep 8, 2018

This looks serious enough for a p2.

@michaelDCurran

This comment has been minimized.

Copy link
Contributor

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?

@leonardder

This comment has been minimized.

Copy link
Collaborator

commented Feb 25, 2019

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

@pluma

This comment has been minimized.

Copy link

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.

@nvaccessAuto nvaccessAuto added this to the 2019.1 milestone Mar 28, 2019

@michaelDCurran michaelDCurran modified the milestones: 2019.1, 2019.2 Mar 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.