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

error loading a saved engine #625

Closed
hvaneylen opened this issue Jul 14, 2018 · 8 comments
Closed

error loading a saved engine #625

hvaneylen opened this issue Jul 14, 2018 · 8 comments

Comments

@hvaneylen
Copy link

I did the tutorial and save the engine state.
When I try to load it - I obtain
...
snips_nlu.resources.MissingResource: Language resource 'en' not found. This may be solved by running 'snips-nlu download en'

But the resource language has been found for the saving done just before with this code
snips.load_resources('snips_nlu_en') <-- this works
but not with this code
load_resources(u"en")
During the language installation I have this message
Creating a shortcut link for 'snips_nlu_en' didn't work, but you can still load the resources via its full package name: snips_nlu.load_resources('snips_nlu_en')

I guess that the loading engine code use the second instruction to load the resource.

How can I solve this problem - I need to be able to save / load trained engines.

Thanks

@adrienball
Copy link
Contributor

From your logs, there was an issue when creating the symbolic link for the downloaded resources. You can try fixing the link by running:

snips-nlu link snips_nlu_en en --force

If it works successfully, you will be able to load resources with load_resources(u"en").
Otherwise, you can just keep load_resources(u"snips_nlu_en"), i.e. loading the resources using the full package name instead of the linked shortcut.

@hvaneylen
Copy link
Author

hvaneylen commented Jul 16, 2018 via email

@adrienball
Copy link
Contributor

Are your running within a virtual environment?
Admin mode is usually required when you're not in a virtual env.

@adrienball
Copy link
Contributor

I'm closing this as it's been 7 days, feel free to reopen if you still have troubles.

@rskumar
Copy link

rskumar commented Jan 3, 2019

Its not working in virtualenv on windows 7.

Even though it printed message Linking successful and Windows 7 supports symlink with mklink, but path site-packages\snips_nlu\data\en didn't exist.

@waterflyer
Copy link

Hey, I'm hitting the same issue which is linking failed, so I tried the method @adrienball mentioned on Jul 14, 2018, and then I got the following issue:
OSError: symbolic link privilege not held
I'm using windows 10 and working at virtual environment on Pycharm.
How could I solve this problem?
Thank you.

@hvaneylen
Copy link
Author

Have you run this "snips-nlu link snips_nlu_en en --force" in administrator mode ? otherwise It didn't work for me.

@waterflyer
Copy link

@hvaneylen Thank you, you are correct. I did run the installation process on admin mode and guess what, all good and installed successfully without any more works.

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