$ rasa run # triggers argparse error for nlu model

I have trained a new NLU only model with several intents and entities using rasa train nlu and a fresh venv installation of pip install rasa==2.0.0rc1 with spacy and de_core_news_md (my model and training data are in German.

Moreover I was able to successfully run

$ rasa test nlu  --nlu train_test_split/test_data.yml

and get a useful result. However I cannot find any way to boot the server. The docs imply that I should be able to simply run $ rasa run from the same directory where I ran my training and testing phases. However no matter what I try, including adding the model with rasa run --model models/nlu-20200921-145627.tar.gz I just get the same argparse error:

$ rasa run --model models/nlu-20200921-145627.tar.gz
Traceback (most recent call last):
  File "/home/work/nlu_ps72/venv/bin/rasa", line 8, in <module>
  File "/home/work/nlu_ps72/venv/lib/python3.7/site-packages/rasa/__main__.py", line 97, in main
    cmdline_arguments = arg_parser.parse_args()
  File "/usr/lib/python3.7/argparse.py", line 1754, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python3.7/argparse.py", line 1786, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python3.7/argparse.py", line 1974, in _parse_known_args
    positionals_end_index = consume_positionals(start_index)
  File "/usr/lib/python3.7/argparse.py", line 1951, in consume_positionals
    take_action(action, args)
  File "/usr/lib/python3.7/argparse.py", line 1860, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/lib/python3.7/argparse.py", line 1157, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/usr/lib/python3.7/argparse.py", line 1786, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python3.7/argparse.py", line 2021, in _parse_known_args
    ', '.join(required_actions))
TypeError: sequence item 0: expected str instance, NoneType found

Note: I have no actions server or bot, I just have an NLU model where I want to send sentences or sentence fragments and retrieve intent and entity hypotheses via the server. In the 1.x paradigm this always worked trivially, now it seems somehow more ‘complex’, while at the same time indicating it should be simpler :slight_smile:

What am I missing here??

edit: rasa shell nlu also works entirely fine, and processes sentences interactively. The only thing that seems to fail is the server command (which of course is the only thing I actually need :slight_smile:)

edit2: This also works with docker and the following docker-compose.yml:

version: '3.0'
    image: rasa/rasa:2.0.0rc1-full
      - 5005:5005
      - ./:/app
      - run
      - --enable-api
      - --cors
      - "*"

here I can run the http API as expected. This is sufficient for my deployment requirements, but it would still be interesting to understand why the basic rasa run command and all similar variants fail to load in 2.0.

Hm, this is super strange. Looks like it can’t pick up the arguments correctly for some reason :thinking: since the models directory is the default place to look for models, what happens if you try to run just rasa run without the models arg?

It fires the same error if I try without arguments. Very strange. I am just running it with docker now. But I have encountered the issue again try to do:

$ rasa test --nlu data/nlu.yml --cross-validation

this also does not work, even though the test nlu command works in non-cross-validation mode.

Edit: Nevermind - this one works, I just needed to give rasa test nlu --nlu data/nlu.yml --cross-validation maybe the run command is similar?