Custom Component RASA

Hi, I am trying to introduce a Sentiment Analyzer in RASA NLU pipelinE. I am using this blog for refrence

But, I am receiving an unhandled error. I am using rasa version 0.15.0.

It would be great, If anyone can help me with with some other reference codes on custom components or sentiment analyzer or a guide of steps to follow to add a custom component in NLU pipeline.

#CustomComponent #RASANLU #Pipeline


It would be better if you copied the error message. I was also having some issues in adding custom components. Maybe this link can help you with the basic steps:

Following is the error, I am getting.

2019-07-24 14:41:18+0530 [-] 2019-07-24 14:41:18 WARNING  rasa_nlu.data_router  - [Failure instance: Traceback (failure with no frames): <class 'rasa_nlu.train.TrainingException'>: <TrainingException instance at 0x7fb3694af708 with str error:
2019-07-24 14:41:18+0530 [-]  Traceback (most recent call last):
2019-07-24 14:41:18+0530 [-]   File "/home/ori/Documents/rizul/my_env/lib/python3.6/site-packages/twisted/python/", line 448, in safe_str
2019-07-24 14:41:18+0530 [-]     return str(o)
2019-07-24 14:41:18+0530 [-] TypeError: __str__ returned non-string (type int)
2019-07-24 14:41:18+0530 [-] >
2019-07-24 14:41:18+0530 [-] ]
2019-07-24 14:41:18+0530 [-] Unhandled Error
	Traceback (most recent call last):
	  File "/home/ori/Documents/rizul/my_env/lib/python3.6/site-packages/twisted/internet/", line 501, in errback
	  File "/home/ori/Documents/rizul/my_env/lib/python3.6/site-packages/twisted/internet/", line 568, in _startRunCallbacks
	  File "/home/ori/Documents/rizul/my_env/lib/python3.6/site-packages/twisted/internet/", line 654, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/home/ori/Documents/rizul/my_env/lib/python3.6/site-packages/twisted/internet/", line 1475, in gotResult
	    _inlineCallbacks(r, g, status)
	--- <exception caught here> ---
	  File "/home/ori/Documents/rizul/my_env/lib/python3.6/site-packages/twisted/internet/", line 1416, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "/home/ori/Documents/rizul/my_env/lib/python3.6/site-packages/twisted/python/", line 512, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "/home/ori/Documents/rizul/my_env/lib/python3.6/site-packages/rasa_nlu/", line 298, in train
	    returnValue(json_to_string({"error": "{}".format(e)}))
	builtins.TypeError: __str__ returned non-string (type int)

Hm, haven’t seen this one before. However, I think that that tutorial was updated to run on rasa 1.0.0 and later, not the unmerged NLU and Core. Can you try updating to the latest rasa?