-1

I got this error on my command prompt while running a python file to train file using rasa nlu

i'm currently using windows 10 rasa_core==0.8.2 rasa_nlu==0.11.4 python 3.6.7 PS: i downgraded both rasa and python as the modules names in rasa's recent version changed and python 3.8 didn't support rasa respectively.

I'm relatively new to coding. I would love to get some help here.

**Traceback (most recent call last):

  File "nlu_model.py", line 12, in <module>

    train_nlu('./data/data.json', 'config_spacy.json', './models/nlu')

  File "nlu_model.py", line 6, in train_nlu

    training_data = load_data(data)

  File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_nlu\converters.py", line 365, in load_data

    return load_rasa_data(files)

  File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_nlu\converters.py", line 267, in load_rasa_data

    validate_rasa_nlu_data(data)

  File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_nlu\converters.py", line 253, in validate_rasa_nlu_data

    raise error

  File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_nlu\converters.py", line 248, in validate_rasa_nlu_data

    validate(data, rasa_nlu_data_schema())

  File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\jsonschema\validators.py", line 541, in validate

    cls(schema, *args, **kwargs).validate(instance)

  File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\jsonschema\validators.py", line 130, in validate

    raise error

jsonschema.exceptions.ValidationError: 'start' is a required property. Failed to validate training data, make sure your data is valid. For more information about the format visit https://rasahq.github.io/rasa_nlu/dataformat.html

Failed validating 'required' in schema['properties']['rasa_nlu_data']['properties']['common_examples']['items']['properties']['entities']['items']:
    {'properties': {'end': {'type': 'number'},
                    'entity': {'type': 'string'},
                    'start': {'type': 'number'},
                    'value': {'type': 'semphasized texttring'}},
     'required': ['start', 'end', 'entity'],**strong text**
     'type': 'object'}

On instance['rasa_nlu_data']['common_examples'][3]['entities'][1]:
    {'entities': [], 'intent': 'goodbye', 'text': 'Thank you for your help'}**
  • error shows that you have element `{'entities': [], 'intent': 'goodbye', 'text': 'Thank you for your help'}` without `start` - so it seems you have wrong data. You have to change it. – furas Jan 14 '20 at 18:50

1 Answers1

0

Looks like you're using quite outdated version of Rasa, event before 1.0 The latest release is 1.7.0

You can find instructions for the upgrade here

Could you try to upgrade Rasa and try again?

degiz
  • 39
  • 3