Hello, I’m getting error while running the rasa action server as “rasa_sdk.executor - Failed to register package ‘actions’.” Yo can see my folder structure and error in the Screenshots. and also I’m sharing the my rasa action file please have a look.actions.py (1.6 KB)
Hi, based on the line "No module named database_connectivity
", it looks like your actions.py
is not able to find the file database_connectivity
and the method you tried to import from it. A few things to try:
Are database_connetivity.py
and actions.py
in the same directory? If they are, it might be an issue with where you’re launching the script from. You could try relative imports
hi @fkoerner yes both the database_connetivity.py
and actions.py
in the same directory
IS that the issue? I thought it easier to import by action file if I place both the file in the same directory
No, this is fine, it is easier if they’re in the same folder. However, in your case actions aren’t being called from within the folder. Try this:
from .database_connectivity import DataUpdate
hi @fkoerner, Thank you as per your suggestion I try relative imports and it’s working for me. That was the one issue.