Rasa 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:
rasa run -m models/20191007-115129.tar.gz --enable-api --log-file out.log/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
curl -H "Content-Type:application/json" -X POST -d '{"sender": "Batman", "message":"do not message me"}' "http://localhost:5005/webhooks/rest/webhook"[{"recipient_id":"Batman","text":"My sincere apologies. I will take you off the list right away!"}]curl -H "Content-Type:application/json" -X POST -d '{"sender": "Batman", "message":"do not message me"}' "http://localhost:5005/webhooks/rest/webhook"[]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!"
Update:
Just in case there is curiosity about executing the rest/webhook call twice with different messages, I've tried:
(unreal) โ django git:(test-rasa) โ curl -H "Content-Type:application/json" -X POST -d '{"sender": "Batman", "message":"do not message me"}' "http://localhost:5005/webhooks/rest/webhook"
[{"recipient_id":"Batman","text":"My sincere apologies. I will take you off the list right away!"}]
(unreal) โ django git:(test-rasa) โ curl -H "Content-Type:application/json" -X POST -d '{"sender": "Batman", "message":"do not message me"}' "http://localhost:5005/webhooks/rest/webhook"
[]%
(unreal) โ django git:(test-rasa) โ curl -H "Content-Type:application/json" -X POST -d '{"sender": "Batman", "message":"browsing for fun"}' "http://localhost:5005/webhooks/rest/webhook"
[]%
I also tried parse-ing the same message multiple times to see if there were any difference in the confidence levels or intent classification and I couldn't find any:
(unreal) โ django git:(test-rasa) โ curl -H "Content-Type:application/json" -X POST -d '{"text":"Im just browsing for fun."}' "http://localhost:5005/model/parse"
{"intent":{"name":"just_browsing","confidence":1.0},"entities":[],"intent_ranking":[{"name":"just_browsing","confidence":1.0},{"name":"wrong_number","confidence":0.0}],"text":"Im just browsing for fun."}%
(unreal) โ django git:(test-rasa) โ curl -H "Content-Type:application/json" -X POST -d '{"text":"Im just browsing for fun."}' "http://localhost:5005/model/parse"
{"intent":{"name":"just_browsing","confidence":1.0},"entities":[],"intent_ranking":[{"name":"just_browsing","confidence":1.0},{"name":"wrong_number","confidence":0.0}],"text":"Im just browsing for fun."}%
(unreal) โ django git:(test-rasa) โ curl -H "Content-Type:application/json" -X POST -d '{"text":"Im just browsing for fun."}' "http://localhost:5005/model/parse"
{"intent":{"name":"just_browsing","confidence":1.0},"entities":[],"intent_ranking":[{"name":"just_browsing","confidence":1.0},{"name":"wrong_number","confidence":0.0}],"text":"Im just browsing for fun."}%
@harisibrahimkv actually we just released a version yesterday that fixes it - please try out 1.3.8
Environment:
OS:
Windows 10 pro
I run the rasa shell using rasa shell as given on https://rasa.com/docs/rasa/user-guide/rasa-tutorial/
I have version 1.3.8 for rasa:

but I still see:

@sushrutt12 Hey, I get the same error. Ran the Rasa shell according to the instructions given in the tutorial.
Rasa version 1.3.8
OS : Windows 10
Please let me know if you figure out the solution
@akelad Just tried it with 1.3.8 and the issue still persists. If you need any more specific information to help you debug other than what I have already given in the issue, please do ask.
@wochinge are you sure this was actually fixed?
Its fixed in rasa 1.3.9 thank you!
was a changelog mistake... we since moved the fix to the 1.3.9 changelog :)
Most helpful comment
Its fixed in rasa 1.3.9 thank you!