Can not traina model using Rasa-ui


I have been working a bit with RASA-UI and I can’t train a model since RASA returns an error I don’t understand… This is the trace I get, it seems that the argument that gets to the write() method is empty but I didn’t modify anything and trying with postman gets me to the same ending.

[2021-11-29 16:55:42 +0100] [24279] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/model/train'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/sanic/", line 939, in handle_request
    response = await response
  File "/usr/local/lib/python3.8/dist-packages/rasa/", line 263, in decorated
    result = await result
  File "/usr/local/lib/python3.8/dist-packages/rasa/", line 569, in decorated_function
    return await f(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/rasa/", line 640, in decorated_function
    return await, run)
  File "/usr/lib/python3.8/concurrent/futures/", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/dist-packages/rasa/", line 635, in run
    return thread_loop.run_until_complete(f(request, *args, **kwargs))
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.8/dist-packages/rasa/", line 659, in decorated_function
    return await f(*args, temporary_directory=Path(directory), **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/rasa/", line 1063, in train
    training_payload = _training_payload_from_json(request, temporary_directory)
  File "/usr/local/lib/python3.8/dist-packages/rasa/", line 1484, in _training_payload_from_json["config"], config_path)
  File "/usr/local/lib/python3.8/dist-packages/rasa/shared/utils/", line 118, in write_text_file
TypeError: write() argument must be str, not None

This is the body that RASA-UI sends to train:

{"nlu":"## intent:Hi\n- What's up\n- Good morning\n- Hi\n- Hello\n\n","domain":"slots:\n\nentities:\n\nintents:\n- Hi\n\ntemplates:\n\nactions:\n","config":null,"out":null,"force":"false"}

Any help would be really appreciated,


You might try posting your question in the Rasa X category, this is Rasa OSS.

Does rasa data validate show any errors?