Replies: 7 comments
-
@seanbudd, why did you convert this to a discussion? It's a real issue and it has shown up various times on nvda-addon mailing list without solution. Something should be done on NVDA or nvda-addon side. Either include the missing packages in NVDA or document how to have access to them in one of the dev guide (NVDA or probably NVDA add-on dev guide). If NVAccess does not want or cannot include the missing packages, the issue should be closed with a justification rather than moved to a discussion. Thanks. Cc @josephsl |
Beta Was this translation helpful? Give feedback.
-
Hi, This is controlled by:
To include parts of packages such as xml.sax in an add-on, the entire parent package must be included as part of add-on directories somewhere (typically under globalPlugins/whatever/packageName). One potential workaround is importing the local package (inside an add-on), which should be done at the top of the module where the package is to be loaded (of course add the path to sys.path). Another option is using a Python package that provides xml.sax but does not rely on standard Python features for implementation i.e. a standalone sax reader, or perhaps a C extension (pyd file) that provides this capability without resorting to Python's way of doing it. As this is something beyond NVDA (more towards Py2exe thing), I advise closing this discussion as "cantfix". I'll do everything I can to document this in the next revision of add-on development guide before start of spring classes in the middle of January. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Thanks @josephsl for this clarification. Looking forward to read the new version of add-on dev guide with a concrete example if possible. |
Beta Was this translation helpful? Give feedback.
-
And indeed documented: https://github.com/nvdaaddons/DevGuide/wiki/NVDA-Add-on-Development-Guide |
Beta Was this translation helpful? Give feedback.
-
Thanks for this very quick update! I have not tested myself but it's good that it is documented. @Xavier74 if the steps described by @josephsl in the add-on dev guide allow you to fix the issue you have encountered, let us know here. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I think nvda devs should just include lacking files to library.zip, then everything will be fine. |
Beta Was this translation helpful? Give feedback.
-
thing that worked for me is,
As long as you are using the same name as things in library.zip, it always try to load from library.zip, so don't use the same name, if you want to use modules you included yourself. |
Beta Was this translation helpful? Give feedback.
-
hello,
I'm trying to build an addon to manage sonos devices via soco api. when importing soco library, soco/core.py try to load xml.sax and cannot find it. it seems to load the xml found into library.zip in nvda subfolder, and does not look in the xml folder i've included in my addon and customized with the sys.path.insert(0, 'path\to\xml')
have you a solution to override the xml included into the library.zip package? or to customise it if it's better.
many thanks in advance for your help.
best regards
Beta Was this translation helpful? Give feedback.
All reactions