Search code examples
rasa-nlurasa-corerasa

Cannot execute this command “rasa run actions & rasa shell”


Using Rasa open source I tried to execute (Windows Powershell) this command rasa run action & rasa shell it generate some error like this:

At line:1 char:17
+ rasa run action & rasa shell
+                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to      
pass it as part of a string.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : AmpersandNotAllowed

Solution

  • In PowerShell you can use a semicolon to run 2 commands (note it should be rasa run actions):

    rasa shell; rasa run actions
    

    In cmd you can still use ampersand.

    However this won't work on Windows where commands are run sequentially. One solution is to have a terminal session for each command (you also don't mix up logs and can restart only one if you need to)