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

natlinkcore site package should be added to python path #60

Closed
MarkRx opened this issue Aug 31, 2021 · 4 comments
Closed

natlinkcore site package should be added to python path #60

MarkRx opened this issue Aug 31, 2021 · 4 comments

Comments

@MarkRx
Copy link

MarkRx commented Aug 31, 2021

In order for dragonfly to import natlink when running the Run_Caster_DNS.bat script it needs to be directly accessible. I think this can be done by putting it on the python path using a module.pth file in the natlink python module.

https://docs.python.org/3/library/site.html

Without the module on the path it fails with this:

C:\voice\caster>Run_Caster_DNS.bat
Running DNS/DPI from Dragonfly CLI with Natlink.
WARNING:engine.natlink:Requested engine 'natlink' is not available: Natlink is not installed: No module named 'natlink' ERROR:command:Requested engine 'natlink' not available.
Press any key to continue . . .

The path can also manually be modified by setting the PYTHONPATH variable:

set PYTHONPATH=C:\Python\Python38-32\Lib\site-packages\natlinkcore

@dougransom
Copy link
Member

I think this is an undesirable solution - think of it as a workaround.

I suspect what is going on is the dependent packages have not been updated since natlink moved to qualified imports. I think the issue should be reported in caster or other dependent packages.

@quintijn
Copy link
Contributor

quintijn commented Sep 1, 2021

Well, from the new version of natlink, the import should go different:

from natlinkcore import natlink

Please try, and remove the set PYTHONPATH line above...

@MarkRx
Copy link
Author

MarkRx commented Sep 2, 2021

Created dictation-toolbox/dragonfly#354

@LexiconCode
Copy link
Member

Closing as this is being addressed in dragonfly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants