'NoneType' object has no attribute 'handle_message'
See original GitHub issueRasa Core version: 0.12.3 RASA NLU :: 0.13.8
Python version: 3.6.1
Operating system (windows, osx, …):
Issue: ‘NoneType’ object has no attribute ‘handle_message’
Below is code snippet for server.py file which is causing an error ::
`@app.route('/api/v1/<sender_id>/respond', methods=['GET', 'POST'])
def respond(self, request, sender_id):
request.setHeader('Content-Type', 'application/json')
request.setHeader('Access-Control-Allow-Origin', '*')
request_params = request_parameters(request)
print("=========Request PARam================: ",request_params)
if 'query' in request_params:
message = request_params.pop('query')
elif 'q' in request_params:
message = request_params.pop('q')
else:
request.setResponseCode(400)
return json.dumps({"error": "Invalid parse parameter specified"})
try:
out = CollectingOutputChannel()
print("***********", message, "====", out, "====", sender_id)
response = self.agent.handle_message(message, output_channel=out, sender_id=sender_id) #response = UserMessage(message, out, sender_id)
#processor = self.agent._create_processor()
#response = processor.handle_message(UserMessage(message, out, sender_id))
print("==UserMessage==", response.__dict__)
request.setResponseCode(200)
print("TRY: " , response)
return json.dumps(response)
except Exception as e:
request.setResponseCode(500)
logger.error("Caught an exception during parse: {}".format(e), exc_info=1)
return json.dumps({"error": "{}".format(e)})
Below is the error screenshot
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
'NoneType' object has no attribute 'send' even though it should ...
What's happening is jeneral_channel = client.get_channel(...) is resulting in jeneral_channel being a None object because client.get_channel ...
Read more >Failed to handle message, error: 'NoneType' object has no ...
Failed to handle message, error: 'NoneType' object has no attribute 'get', Line: 54 · Plugins Sécurité · plugin-dahuavto.
Read more >AttributeError: 'NoneType' object has no attribute 'sendMessage'
AttributeError : 'NoneType' object has no attribute 'sendMessage' I am getting this error message, what is the problem exactly? Tagged:.
Read more >AttributeError: 'NoneType' object has no attribute 'call' on ...
Hello, I'm at a loss to explain why this flow fails and succeeds at the same time… It only consists in triggering a...
Read more >AttributeError: 'NoneType' object has no attribute 'event' #553
I get the AttributeError: 'NoneType' object has no attribute 'event' error when making future dataframe. It's probably something I overlooked but assistance ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,I created a weatherbot on version 7 of RASA.Everything is perfectly fine.However,I happened to upgrade RASA to version 12,after which I’m getting empty response from this agent.
The code snippet in my previous reply is from server.py file
The pieces of code which doesnot contain “”"resp = agent.handle_message(“hello”) “” are giving me the response properly. Im not able to figure out why there is a problem with agent.handle_message()
Other observation is that,the code which contains agent.handle_message() ,which is giving empty response on version 12 of RASA is giving the proper response on version 7 of RASA.
Ive upgraded RASA from version 7 to version 12 based on @JustinaPetr tutorial on weatherbot using latest version of RASA.Here is the link :: https://github.com/JustinaPetr/Weatherbot_Tutorial/tree/master/Full Code [Latest release of Rasa NLU and Rasa Core]
@wochinge @akelad @JustinaPetr @tmbo Please help me in resolving this issue…I was trying to resolve this since past few days…Tried posting it in RASA forums but no response …
@wochinge , My issue is not solved… 1.I want to migrate from version 7 to version 13 of RASA which less changes possible.So kept the channel as it is. 2.I happened to re-train NLU.I have close to 50 examples for the 3 intents i used in my bot. 3.I happened to resolve a minor issue(User_id not getting captured in the slot) caused due to lack of proper training.
My endpoint server is up and running .The bot works just fine from the command line. I…But im getting empty response when im trying to hit it through postman… Can someone help me out with this… Here is my error_screenshot in postman: