nvda
nvda copied to clipboard
More accurate error text needed when opening add-ons with faulty manifests
Is your feature request related to a problem? Please describe.
When attempting to install an add-on with errors in its manifest, the error text is misleading.
For example, if the minimum NVDA version is set to None instead of some actual version number, the error that is shown, captured from Speech History, is:
Error dialog
Failed to open add-on package file at N:\test\test_add-on-0.1.nvda-addon - missing file or invalid file format
Describe the solution you'd like
An error that says something closer to what actually happened. Perhaps:
Failed to install add-on package file N:\test\test_add-on-0.1.nvda-addon - missing or invalid add-on manifest.
Additional context
The error shown seems to indicate that the add-on package file is the missing file or [the one with the] invalid file format. But the zip package is actually fine. That impression is reinforced by the phrase "failed to open" followed by the add-on package file name. This can cause someone to spend time investigating the wrong thing, when trying to diagnose why an add-on isn't installing. The actual problem is with the manifest, and the error should say as much.
If you are someone who looks at logs all the time, it is clear what happened, but most users aren't supposed to have to do that.
DEBUG - NVDAHelper.nvdaControllerInternal_installAddonPackageFromPath (21:12:44.217):
Requesting installation of add-on from N:\test\test_add-on-0.1.nvda-addon
WARNING - addonHandler._report_manifest_errors (21:12:44.280):
Error loading manifest:
{'docFileName': True, 'description': True, 'author': True, 'url': True, 'lastTestedNVDAVersion': True, 'summary': True, 'minimumNVDAVersion': ValidateError('"None" is not a valid API Version string: None',), 'version': True, 'name': True}
ERROR - gui.addonGui.installAddon (21:12:44.280):
Error opening addon bundle from N:\test\test_add-on-0.1.nvda-addon
Traceback (most recent call last):
File "gui\addonGui.pyc", line 471, in installAddon
File "addonHandler\__init__.pyc", line 568, in __init__
AddonError: Manifest file has errors.