ImportError: cannot import name 'Message' from 'rasa.nlu.training_data'

i am facing this issue. i looked in forum but could not find anything related to this…i am using rasa 2.8.9 and rasa_sdk 2.8.2 version

Can you try from rasa.shared.nlu.training_data import Message?

I have tried this but it is giving the same error

from rasa.shared.nlu.training_data.message import Message

from rasa.shared.nlu.training_data.training_data import TrainingData

1 Like

Sorry for the late reply, glad you solved it meanwhile :slight_smile:

@ChrisRahme hey thanks for reply but now I am getting new error (AttributeError: ‘Message’ object has no attribute ‘text’). i have looked in here http://forum.rasa.com/t/message-object-does-not-recognize-text-attribute-in-custom-component-for-rasa-2-0/36313/2 then I am getting new error which is KeyError: ‘text’

Can you please create a new post with the code?

By the way, please try not to directly copy-paste code or screenshots. The proper way to do it to put three backticks (```) a line before and a line after the code

```
like so
```

sure @ChrisRahme just wait 2-3 min

1 Like