Server sends response once and doesn't respond on subsequent calls.
See original GitHub issueRasa version: Rasa 1.3.7
Rasa X version (if used & relevant):
Python version: Python 3.6.8
Operating system (windows, osx, …): Ubuntu 18.04.3 LTS
Issue:
- I run the Rasa server like so
rasa run -m models/20191007-115129.tar.gz --enable-api --log-file out.log
- I receive the following output:
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
2019-10-07 14:55:33 INFO root - Generating grammar tables from /usr/lib/python3.6/lib2to3/Grammar.txt
2019-10-07 14:55:33 INFO root - Generating grammar tables from /usr/lib/python3.6/lib2to3/PatternGrammar.txt
2019-10-07 14:55:36 INFO root - Starting Rasa server on http://localhost:5005
- I do a curl like so:
curl -H "Content-Type:application/json" -X POST -d '{"sender": "Batman", "message":"do not message me"}' "http://localhost:5005/webhooks/rest/webhook"
- I get the proper response:
[{"recipient_id":"Batman","text":"My sincere apologies. I will take you off the list right away!"}]
- I do a curl again like so:
curl -H "Content-Type:application/json" -X POST -d '{"sender": "Batman", "message":"do not message me"}' "http://localhost:5005/webhooks/rest/webhook"
- And I get an empty response:
[]
- The first
curl
’s log on the server is:
[2019-10-07 14:58:43 +0530] [13345] [ERROR] Exception occurred in one of response middleware handlers
Traceback (most recent call last):
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic/app.py", line 958, in handle_request
request, response
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/spf/framework.py", line 579, in _run_response_middleware
_response = await _response
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/extension.py", line 267, in unapplied_cors_response_middleware
set_cors_headers(req, resp, context, res_options)
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 254, in set_cors_headers
headers_to_set = get_cors_headers(options, req.headers, req.method)
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 174, in get_cors_headers
origins_to_set = get_cors_origins(options, request_headers.get('Origin'))
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in get_cors_origins
return sorted([o for o in origins if not probably_regex(o)])
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in <listcomp>
return sorted([o for o in origins if not probably_regex(o)])
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in probably_regex
return any((c in maybe_regex for c in common_regex_chars))
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in <genexpr>
return any((c in maybe_regex for c in common_regex_chars))
TypeError: argument of type 'NoneType' is not iterable
And the second curl has the same one:
Traceback (most recent call last):
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic/app.py", line 958, in handle_request
request, response
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/spf/framework.py", line 579, in _run_response_middleware
_response = await _response
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/extension.py", line 267, in unapplied_cors_response_middleware
set_cors_headers(req, resp, context, res_options)
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 254, in set_cors_headers
headers_to_set = get_cors_headers(options, req.headers, req.method)
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 174, in get_cors_headers
origins_to_set = get_cors_origins(options, request_headers.get('Origin'))
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in get_cors_origins
return sorted([o for o in origins if not probably_regex(o)])
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in <listcomp>
return sorted([o for o in origins if not probably_regex(o)])
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in probably_regex
return any((c in maybe_regex for c in common_regex_chars))
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in <genexpr>
return any((c in maybe_regex for c in common_regex_chars))
TypeError: argument of type 'NoneType' is not iterable
Error (including full traceback):
Traceback (most recent call last):
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic/app.py", line 958, in handle_request
request, response
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/spf/framework.py", line 579, in _run_response_middleware
_response = await _response
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/extension.py", line 267, in unapplied_cors_response_middleware
set_cors_headers(req, resp, context, res_options)
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 254, in set_cors_headers
headers_to_set = get_cors_headers(options, req.headers, req.method)
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 174, in get_cors_headers
origins_to_set = get_cors_origins(options, request_headers.get('Origin'))
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in get_cors_origins
return sorted([o for o in origins if not probably_regex(o)])
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in <listcomp>
return sorted([o for o in origins if not probably_regex(o)])
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in probably_regex
return any((c in maybe_regex for c in common_regex_chars))
File "/home/haris/.virtualenvs/rasa/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in <genexpr>
return any((c in maybe_regex for c in common_regex_chars))
TypeError: argument of type 'NoneType' is not iterable
Command or request that led to error:
Executing the following curl twice:
`curl -H "Content-Type:application/json" -X POST -d '{"sender": "Batman", "message":"do not message me"}' "http://localhost:5005/webhooks/rest/webhook"`
Content of configuration file (config.yml) (if relevant):
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline: supervised_embeddings
# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
- name: MemoizationPolicy
- name: KerasPolicy
- name: MappingPolicy
Content of domain file (domain.yml) (if relevant):
intents:
- wrong_number
- just_browsing
actions:
- utter_apologies
- utter_marketing
templates:
utter_apologies:
- text: "My sincere apologies. I will take you off the list right away!"
utter_marketing:
- text: "Ah, do carry on and please don't hesitate to reach out for any help!"
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Server does not respond after multiple post requests within a ...
The problem is that I have GoDaddy shared hosting and deployed an ecommerce store build on PHP. Now when the web service receives...
Read more >HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >Understand and troubleshoot Out of Office (OOF) replies
Discusses how OOF works and some of the main reasons why an OOF reply might not get delivered to users.
Read more >HTTP/1.1: Connections
Servers SHOULD always respond to at least one request per connection, if at all possible. Servers SHOULD NOT close a connection in the...
Read more >Define your SPF record—Advanced setup - Google Help
Domains can have one SPF record. However, the SPF record for a domain can specify multiple servers and third parties that are allowed...
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
Its fixed in rasa 1.3.9 thank you!
@DhanrajNectar This seems like a usage question - likely due to the model configuration or training data. Could you please ask it in the Rasa forum?