Error : No module named 'actions'

(Smitty Hoffmann) #1

Hi all. I try to start a bot from a Java-Programm and getting an error i can’t really fix: My Python-Code is :

    arg_parser = create_argument_parser()
    cmdline_args = arg_parser.parse_args()

    interpreter = RasaNLUInterpreter(cmdline_args.nlu)
    agent = Agent.load(cmdline_args.core,interpreter= interpreter)
    print("Bot geladen")

    if True:

The prints are for testing purposes and give: C:\Users\Chris\Desktop\WeatherBot --> currentWorkingDirectoy ./models/nlu/default/weathernlu/ --> path to nlumodel ./models/dialogue/coreModel/ --> path to coremodel

Still i get the error: No module named ‘actions’ I have an file in the WorkingDirectory so why isn’t it found?

it’s also in the same directory like my domain.yml

The python script i call to run the bot isnt in the bot-project directory. is this the problem?

(Akela Drissner) #2

Try adding an empty to that folder and see if it works then :slight_smile:

(Smitty Hoffmann) #3

Didn’t work.

My is in C:\Users\Chris\IdeaProjects\RasaStackMate\src\main\pythonProcessing. My domain and actionFile is in C:\Users\Chris\Desktop\Rasa_Stuff\Weatherbot My coremodel is in C:\Users\Chris\Desktop\Rasa_Stuff\Weatherbot\models\dialogue\coremodel calls agent.load and gives me the error… Does have to be in the same directory as my and domain.yml? I also tried to set the workingDirectory to C:\Users\Chris\Desktop\Rasa_Stuff\Weatherbot but no success…

(Akela Drissner) #4

Ok yes the should be in the same directory. If you want it to be in a different directory then you have to make your bot a package and install it and call the action like this weatherbot.actions.action_name