Hey, I am trying to split my actions for organizing it, this is my folder structure:
actions
__init__.py
file1.csv
fil2.yml
rasa_actions1.py
rasa_actions2.py
myimports.py
common
__init__.py
globals.py
helpers.py
connections
__init__.py
chat_api.py
tables
__init__.py
table1.py
table2.py
Basically I am trying to import all submodules and packages in myimports.py (including rasa_sdk package) and then importing myimports.py in every rasa_actions.py file.
In myimports.py, I import submodules like this:
from .connections.chat_api import ChatAPI
from .common.globals import *
In rasa_actions.py, I import myimports.py like this:
from .myimports import *
In my submodules (connections, for example), I import other submodules like this:
from ..common.globals import *
When I try to start the action server with rasa run actions --actions actions in local mode and within my rasa folder, I get the following error:
@ElgerJP This might have to do something with you using relative imports.
I’d advise on using absolute imports and making sure to append your project’s root directory to PYTHONPATH. Hope this helps!