Closed YuukanOO closed 5 years ago
@YuukanOO ,
The load_resources
function will not be removed, however it will no longer be imported in the __init__.py
of the snips_nlu
package. Instead, you can import it as follow:
from snips_nlu.resources import load_resources
This is already available, so you can already switch in order to avoid troubles when you update to 0.21.0.
The reason of this change, and of this warning, is mostly to inform users that, in general, loading resources is no longer required. In your case, as the resources linking fails, it still makes sense to load resources manually.
I'm curious about the linking error, can you provide details about it? Any idea what could cause it? Are you running withing a virtual environment? Thanks
Good to know! I'll update then, thanks for the quick answer ;)
After your answer I doubled check and if I'm running the command python -m snips_nlu download fr
as an administrator, linking succeeded. You were right here too (on Windows i'm not using venv, shame on me).
But I think I will still use the manual load_resources
since I use it to automatically download resources as needed (https://github.com/atlassistant/pytlas/blob/develop/pytlas/understanding/snips.py#L97).
Thanks!
As mentionned in #750, I use
load_resources
(especially on Windows when linking fail). After updating to0.20.0
, I get this warning:when using this code:
If I remove the
load_resources
call as mentionned per the warning, it doesn't work and I'm back with this:So my question is: what is the recommended way, as of snips-nlu 0.20.0, to load resources that will still work when the 0.21.0 goes out?