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

Installer fails. Romanian windows display language #6326

Closed
florianionascu7 opened this issue Sep 1, 2016 · 36 comments · Fixed by #10875
Closed

Installer fails. Romanian windows display language #6326

florianionascu7 opened this issue Sep 1, 2016 · 36 comments · Fixed by #10875
Assignees
Labels
component/i18n component/installer
Milestone

Comments

@florianionascu7
Copy link

florianionascu7 commented Sep 1, 2016

Hi everyone!
I found a bug in NVDA. This exists from NVDA 2016.2.
I am using my Windows display language in romanian and, for example, I tried to install NVDA RC2 for 2016.3.
When the instalation process finish, NVDA doesn't tell me that it has been succesfully installed, it displays an error: NVDA instalation failed, please see the log viewer for more informations.
If I use the windows display language in english, NVDA will install succesfully.
Note: I haven't tried to use other language packages, I speak only romanian and english. I know that at romanian NVDA has this bug and it must be fixed.
Please read this log.
Thank you!

INFO - main (00:10:29):
Starting NVDA
INFO - core.main (00:10:30):
Config dir: C:\Users\Florian Ionascu\AppData\Roaming\nvda
INFO - core.main (00:10:30):
NVDA version rc-13528,308e048d
INFO - core.main (00:10:30):
Using Windows version 10.0.10586 workstation
INFO - core.main (00:10:30):
Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)]
INFO - core.main (00:10:30):
Using comtypes version 0.6.2
INFO - synthDriverHandler.setSynth (00:10:32):
Loaded synthDriver vocalizer_expressive
INFO - core.main (00:10:32):
Using wx version 3.0.2.0 msw (classic)
INFO - braille.initialize (00:10:32):
Using liblouis version 2.6.5
INFO - braille.BrailleHandler.setDisplayByName (00:10:32):
Loaded braille display driver noBraille, current display has 0 cells.
INFO - brailleInput.initialize (00:10:32):
Braille input initialized
WARNING - core.main (00:10:32):
Java Access Bridge not available
INFO - _UIAHandler.UIAHandler.MTAThreadFunc (00:10:32):
UIAutomation: IUIAutomation3
INFO - _UIAHandler.UIAHandler.MTAThreadFunc (00:10:32):
UIAutomation: IUIAutomation3
INFO - core.main (00:10:34):
NVDA initialized
ERROR - RPC process 11132 (nvda_slave.exe) (00:11:04):
main.main:
slave error
Traceback (most recent call last):
File "nvda_slave.pyw", line 29, in main
File "installer.pyc", line 391, in install
File "installer.pyc", line 202, in registerInstallation
File "installer.pyc", line 56, in createShortcut
File "comtypes\client\lazybind.pyc", line 163, in caller
File "comtypes\automation.pyc", line 664, in _invoke
COMError: (-2147352567, 'Exception occurred.', (None, None, None, 0, None))
ERROR - gui.installerGui.doInstall (00:11:04):
Installation failed: 1
INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (00:11:21):
Developer info for navigator object:
name: u'Skype\u2122\u200e [42] - florianionascu@hotmail.com'
role: ROLE_PANE
states: STATE_FOCUSABLE
isFocusable: True
hasFocus: False
Python object: <NVDAObjects.IAccessible.IAccessible object at 0x052273F0>
Python class mro: (<class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <type 'object'>)
description: None
location: (-32000, -32000, 0, 0)
value: None
appModule: <'skype' (appName u'skype', process ID 18596) at address 52277d0>
appModule.productName: u'Skype'
appModule.productVersion: u'7.26'
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
windowHandle: 66580
windowClassName: u'tSkMainForm'
windowControlID: 1049957
windowStyle: 919535616
windowThreadID: 7276
windowText: u'Skype\u2122\u200e [42] - florianionascu@hotmail.com'
displayText: u''
IAccessibleObject: <POINTER(IAccessible) ptr=0x7722898 at 4e41990>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=66580, objectID=-4, childID=0
IAccessible accName: u'Skype\u2122\u200e [42] - florianionascu@hotmail.com'
IAccessible accRole: ROLE_SYSTEM_CLIENT
IAccessible accState: STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048576)
IAccessible accDescription: None
IAccessible accValue: None

@jcsteh
Copy link
Contributor

jcsteh commented Sep 1, 2016

@jcsteh
Copy link
Contributor

jcsteh commented Sep 1, 2016

Technical: This can be reproduced with the following code in the Python
console:
installer.createShortcut(os.path.join("foo", u"Locație web NVDA.lnk"), targetPath=versionInfo.url, prependSpecialFolder="Programs")

@florianionascu7
Copy link
Author

florianionascu7 commented Sep 1, 2016

     MR. Jamie. I belive that I fixed the bug. I retranslated NVDA 

sit web from ("Locație web NVDA") to ("Pagina web NVDA"). It's OK now?

@jcsteh
Copy link
Contributor

jcsteh commented Sep 2, 2016

That should fix it, yes. Are you happy with this translation? If not, I can try to further investigate why Windows fails when we use this ț character.

@florianionascu7
Copy link
Author

florianionascu7 commented Sep 2, 2016

     I am happy with that translation, so I will leave ("Pagina web 

NVDA"). MR. James, thank you for your support.

@jcsteh jcsteh added this to the 2016.4 milestone Sep 2, 2016
@jcsteh
Copy link
Contributor

jcsteh commented Sep 2, 2016

Okay. In that case, this can be closed once your updated translation is merged. This should be next Friday; you just missed out on the translation sync by a few hours. :)

@jcsteh
Copy link
Contributor

jcsteh commented Sep 12, 2016

The new translation landed in ab4385d, so this should now work as expected. Thanks for your work.

@jcsteh jcsteh closed this as completed Sep 12, 2016
@florianionascu7
Copy link
Author

florianionascu7 commented Aug 29, 2017

Hello. I'm requesting the reopening of this issue because it wasn't fixed. If a user has the Windows display language set to Romanian and wants to install NVDA 2017.3, 2017.2, 2017.1 or 2016.4, the error that have been mentioned in my first comment of this issue still appears.
Cheers,
Florian

@leonardder leonardder reopened this Aug 29, 2017
@ehollig ehollig added component/installer component/i18n labels Aug 29, 2017
@florianionascu7
Copy link
Author

florianionascu7 commented Aug 29, 2017

Thanks for reopening. I hope this bug will be succesfully fixed.

@jcsteh
Copy link
Contributor

jcsteh commented Aug 29, 2017

As noted in #6326 (comment), this should have been fixed by the new translation of "NVDA web site" ("Pagina web NVDA"). If this error is still occurring, it is occurring due to a different message. Please provide a new log showing the installation failing, as the line number in the code where the error occurs is probably different. Thanks.

@jcsteh jcsteh removed this from the 2016.4 milestone Aug 29, 2017
@florianionascu7
Copy link
Author

florianionascu7 commented Aug 30, 2017

Hello James, the log is here.

INFO - main (09:18:05.325):
Starting NVDA
INFO - core.main (09:18:07.552):
Config dir: C:\Users\Florian\AppData\Roaming\nvda
INFO - config.ConfigManager._loadConfig (09:18:07.553):
Loading config: C:\Users\Florian\AppData\Roaming\nvda\nvda.ini
INFO - core.main (09:18:08.234):
NVDA version 2017.3
INFO - core.main (09:18:08.236):
Using Windows version 10.0.14393 workstation
INFO - core.main (09:18:08.236):
Using Python version 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]
INFO - core.main (09:18:08.236):
Using comtypes version 0.6.2
INFO - synthDriverHandler.setSynth (09:18:11.437):
Loaded synthDriver vocalizer_expressive
INFO - core.main (09:18:11.506):
Using wx version 3.0.2.0 msw (classic)
INFO - brailleInput.initialize (09:18:11.657):
Braille input initialized
INFO - braille.initialize (09:18:11.661):
Using liblouis version 3.2.0
INFO - braille.BrailleHandler.setDisplayByName (09:18:11.664):
Loaded braille display driver noBraille, current display has 0 cells.
WARNING - core.main (09:18:11.832):
Java Access Bridge not available
INFO - _UIAHandler.UIAHandler.MTAThreadFunc (09:18:11.859):
UIAutomation: IUIAutomation3
INFO - core.main (09:18:13.612):
NVDA initialized
ERROR - RPC process 920 (nvda_slave.exe) (09:18:43.732):
main.main:
slave error
Traceback (most recent call last):
File "nvda_slave.pyw", line 29, in main
File "installer.pyo", line 398, in install
File "installer.pyo", line 208, in registerInstallation
File "installer.pyo", line 56, in createShortcut
File "comtypes\client\lazybind.pyo", line 163, in caller
File "comtypes\automation.pyo", line 664, in _invoke
COMError: (-2147352567, 'Exception occurred.', (None, None, None, 0, None))
ERROR - gui.installerGui.doInstall (09:18:43.900):
Installation failed: 1

@jcsteh
Copy link
Contributor

jcsteh commented Aug 31, 2017

Okay. Same problem, even same character, but different message. The problematic message is:

"Explorează dosarul NVDA pentru configurație utilizator"

Note the "ț" in "configurație".

I just checked the translation and there are two other strings that are going to hit this same problem:

  1. "Documentation" translates to "Documentație".
  2. "Commands Quick Reference" translates to "Referință Rapidă a Comenzilor".

It looks like this happens for any character that can't be encoded using the system ANSI code page:

>>> u"\u2022".encode("mbcs")
'\x95'
>>> u"ț".encode("mbcs")
'?'
>>> u"‣".encode("mbcs")
'?'

If I try creating the shortcut with either of the latter two, I get an exception.

Even though we pass the string as Unicode, wScript.Shell seems to convert it to ANSI. It seems others have hit this problem too. Note that this is definitely not a file system issue; you can quite happily write a file containing these characters if you use native Unicode:

>>> file(u"c:\\users\\jamie\\junk\\jtd‣bar", "w")
<open file u'c:\\users\\jamie\\junk\\jtd\u2023bar', mode 'w' at 0x070573E8>

I wonder whether we'll need to switch to an alternative way of creating these shortcuts. We should be able to do this using IShellLink and friends. IShellLink specifically mentions IShellLinkA and IShellLinkW interfaces, which suggests the latter does explicitly do Unicode. See this article for further details. I did a bit of investigation on this in the labyrinth that is MSDN:

  1. I found CLSID_ShellLink in ShObjIdl.idl (00021401-0000-0000-C000-000000000046). Unfortunately, it looks like there's no typelib registered for this.
  2. There are also dispatch interfaces for most (all?) of this stuff. You access them by using the "shell.application" progId. See Scriptable Shell Objects and ShellLinkObject.Save for details/examples.

CC @michaelDCurran so he's aware of this. I'd say this is pretty high priority, since it breaks installation for Romanian users.

@florianionascu7
Copy link
Author

florianionascu7 commented Sep 2, 2017

Hello Jamie!
I just read your comment and I can say that the string "Explore NVDA user configuration directory", translated as "Explorează dosarul NVDA pentru configurație utilizator" can't be translated in other ways in Romanian. The same thing applies to "Documentation (Documentație)" and for "Commands quick reference (Referință rapidă a comenzilor)". However, I found a possible solution for this problem. Maybe you heard that Romanian has 2 keyboard language variants, Romanian standard and Romanian legacy. Before 2016.2, NVDA was translated using the Romanian legacy characters. When Dan pungă has joined the translation team, he replaced the Romanian legacy characters with Romanian standard characters. Well, I want to replace the ț with ţ in the strings mentioned above. This might be a good solution. What do you think about it?

@jcsteh
Copy link
Contributor

jcsteh commented Sep 3, 2017

That might work. ţ does seem to be handled correctly by my system's ANSI code page. However, I'm on an English system, so the results might be different. Can you please try the following:

  1. Open the NVDA Python console by pressing NVDA+control+z.
  2. Paste the following exactly as it appears:
    u"ţ".encode("mbcs")
  3. Press enter.
  4. Press f6 and copy the resulting output.

@zstanecic
Copy link
Contributor

zstanecic commented Sep 3, 2017

@zstanecic
Copy link
Contributor

zstanecic commented Sep 3, 2017

@jcsteh
Copy link
Contributor

jcsteh commented Sep 3, 2017

@zstanecic
Copy link
Contributor

zstanecic commented Sep 3, 2017

@jcsteh
Copy link
Contributor

jcsteh commented Sep 3, 2017

@zstanecic
Copy link
Contributor

zstanecic commented Sep 3, 2017

@jcsteh
Copy link
Contributor

jcsteh commented Sep 4, 2017

@zstanecic
Copy link
Contributor

zstanecic commented Sep 4, 2017

@jcsteh
Copy link
Contributor

jcsteh commented Sep 4, 2017

@florianionascu7
Copy link
Author

florianionascu7 commented Sep 9, 2017

Hello Jamie, the result is: 't'

@florianionascu7
Copy link
Author

florianionascu7 commented Sep 9, 2017

Note: My system is set to Romanian.

@zstanecic
Copy link
Contributor

zstanecic commented Sep 9, 2017

@jcsteh
Copy link
Contributor

jcsteh commented Sep 9, 2017

@zstanecic
Copy link
Contributor

zstanecic commented Sep 9, 2017

@florianionascu7
Copy link
Author

florianionascu7 commented Sep 9, 2017

This might be a solution.

@jcsteh
Copy link
Contributor

jcsteh commented Sep 9, 2017

@florianionascu7
Copy link
Author

florianionascu7 commented Sep 13, 2017

Hello, I've installed the latest master Snapshot and I've received the same error. This is the log:
INFO - main (16:32:37.033):
Starting NVDA
INFO - core.main (16:32:37.710):
Config dir: C:\Users\Florian\AppData\Roaming\nvda
INFO - config.ConfigManager._loadConfig (16:32:37.711):
Loading config: C:\Users\Florian\AppData\Roaming\nvda\nvda.ini
INFO - core.main (16:32:38.114):
NVDA version master-14426,4138af14
INFO - core.main (16:32:38.115):
Using Windows version 10.0.15063 workstation
INFO - core.main (16:32:38.115):
Using Python version 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]
INFO - core.main (16:32:38.115):
Using comtypes version 0.6.2
INFO - synthDriverHandler.setSynth (16:32:39.545):
Loaded synthDriver vocalizer_expressive
INFO - core.main (16:32:39.545):
Using wx version 3.0.2.0 msw (classic)
INFO - brailleInput.initialize (16:32:39.545):
Braille input initialized
INFO - braille.initialize (16:32:39.545):
Using liblouis version 3.2.0
INFO - braille.BrailleHandler.setDisplayByName (16:32:39.545):
Loaded braille display driver noBraille, current display has 0 cells.
WARNING - core.main (16:32:39.690):
Java Access Bridge not available
INFO - _UIAHandler.UIAHandler.MTAThreadFunc (16:32:39.707):
UIAutomation: IUIAutomation3
INFO - core.main (16:32:42.174):
NVDA initialized
ERROR - RPC process 10592 (nvda_slave.exe) (16:34:26.200):
main.main:
slave error
Traceback (most recent call last):
File "nvda_slave.pyw", line 29, in main
File "installer.pyc", line 398, in install
File "installer.pyc", line 212, in registerInstallation
File "installer.pyc", line 56, in createShortcut
File "comtypes\client\lazybind.pyc", line 163, in caller
File "comtypes\automation.pyc", line 664, in _invoke
COMError: (-2147352567, 'Exception occurred.', (None, None, None, 0, None))
ERROR - gui.installerGui.doInstall (16:34:26.351):
Installation failed: 1
INFO - synthDrivers.espeak.SynthDriver.init (16:36:11.148):
Using eSpeak NG version 1.49.1 dev
INFO - synthDriverHandler.setSynth (16:36:11.453):
Loaded synthDriver espeak

@florianionascu7
Copy link
Author

florianionascu7 commented Oct 7, 2017

Hello. I installed the latest master snapshot and I noticed that the problem has been fixed succesfully. Thank you all for the support.

@florianionascu7
Copy link
Author

florianionascu7 commented Oct 9, 2017

Well, this issue can be closed now and can be added to 2017.4 milestone. Finally, I can say that I enjoy this bug was fixed after a long discussion time.

@ehollig
Copy link
Collaborator

ehollig commented Oct 9, 2017

Closing, as requested in #6326 (comment)

@florianionascu7
Copy link
Author

florianionascu7 commented Feb 10, 2020

Hello! Please re-open this issue, as it re-occured in NVDA 2019.3. Here's the log.

INFO - __main__ (14:57:20.824) - MainThread (9204):
Starting NVDA version 2019.3
INFO - core.main (14:57:22.161) - MainThread (9204):
Config dir: C:\Users\Florian\AppData\Roaming\nvda
INFO - config.ConfigManager._loadConfig (14:57:22.161) - MainThread (9204):
Loading config: C:\Users\Florian\AppData\Roaming\nvda\nvda.ini
INFO - core.main (14:57:22.271) - MainThread (9204):
Using Windows version 10.0.18363 workstation
INFO - core.main (14:57:22.271) - MainThread (9204):
Using Python version 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 14 2019, 23:09:19) [MSC v.1916 32 bit (Intel)]
INFO - core.main (14:57:22.271) - MainThread (9204):
Using comtypes version 1.1.7
INFO - core.main (14:57:22.271) - MainThread (9204):
Using configobj version 5.1.0 with validate version 1.0.1
INFO - synthDriverHandler.setSynth (14:57:25.758) - MainThread (9204):
Loaded synthDriver vocalizer
INFO - core.main (14:57:25.761) - MainThread (9204):
Using wx version 4.0.3 msw (phoenix) wxWidgets 3.0.5 with six version 1.12.0
INFO - brailleInput.initialize (14:57:25.771) - MainThread (9204):
Braille input initialized
INFO - braille.initialize (14:57:25.771) - MainThread (9204):
Using liblouis version 3.10.0
INFO - braille.initialize (14:57:25.800) - MainThread (9204):
Using pySerial version 3.4
INFO - braille.BrailleHandler.setDisplayByName (14:57:25.822) - MainThread (9204):
Loaded braille display driver noBraille, current display has 0 cells.
INFO - core.main (14:57:26.764) - MainThread (9204):
Java Access Bridge support initialized
INFO - _UIAHandler.UIAHandler.MTAThreadFunc (14:57:26.833) - _UIAHandler.UIAHandler.MTAThread (1004):
UIAutomation: IUIAutomation6
INFO - core.main (14:57:27.527) - MainThread (9204):
NVDA initialized
ERROR - RPC process 2196 (nvda_slave.exe) (14:57:47.450) - Dummy-2 (9544):
__main__.main:
slave error
Traceback (most recent call last):
  File "nvda_slave.pyw", line 47, in main
  File "installer.pyc", line 454, in install
  File "installer.pyc", line 272, in registerInstallation
  File "installer.pyc", line 67, in createShortcut
  File "comtypes\client\lazybind.pyc", line 182, in caller
  File "comtypes\automation.pyc", line 729, in _invoke
_ctypes.COMError: (-2147352567, 'Exception occurred.', (None, None, None, 0, None))
ERROR - gui.installerGui.doInstall (14:57:47.595) - MainThread (9204):
Installation failed: 1

What's the problem?

@feerrenrut
Copy link
Member

feerrenrut commented Feb 10, 2020

Re-opening as requested.

@feerrenrut feerrenrut reopened this Feb 10, 2020
@feerrenrut feerrenrut added this to Needs triage in 2019.3 via automation Feb 10, 2020
@feerrenrut feerrenrut removed this from the 2017.4 milestone Mar 3, 2020
@feerrenrut feerrenrut moved this from Needs triage to Won't fix for 2019.3 in 2019.3 Mar 3, 2020
@feerrenrut feerrenrut added this to Needs Triage in 2020.1 via automation Mar 3, 2020
@feerrenrut feerrenrut moved this from Needs Triage to High priority in 2020.1 Mar 9, 2020
@feerrenrut feerrenrut self-assigned this Mar 9, 2020
@feerrenrut feerrenrut changed the title An important bug. Romanian, a windows display language Installer fails. Romanian windows display language Mar 13, 2020
2020.1 automation moved this from High priority to Done Mar 17, 2020
feerrenrut added a commit that referenced this issue Mar 17, 2020
Partial fix for #5166 #6326

Some unicode characters can not be used by the wsh API to create a shortcut. Sometimes translations contain these characters causing an error during installation.
Mitigate this issue by wrapping each call to create shortcut in a try block, on error try to create the shortcut without translation.
@nvaccessAuto nvaccessAuto added this to the 2020.1 milestone Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/i18n component/installer
Projects
No open projects
2019.3
Won't fix for 2019.3
2020.1
  
Done
7 participants