Error while running rasa shell or rasa --enable api command in docker image

I am trying to follow tutorial over here. But when i run the command docker run -it -v $(pwd):/app rasa/rasa shell And enters message to chat i get following results.

And when i wish to run make my model serve as api using this command sudo docker run -it -v $(pwd):/app rasa/rasa run -m models/20190930-103430.tar.gz --enable-api machine goes into wait stage & nothing happens & at last i have to call off the command. Screenshot for the same is here.

Please help me out with it. New here & wants to try my NLU model to serve as API using docker. Any help is appreciated. Thank you for your time.

Even tried using this command sudo docker run \ -v $(pwd)/models:/app/models \ rasa/rasa:latest-full \ run --enable-api -m models/20190930-103430.tar.gz But still it goes into waiting state.

@Akshay23 which version of rasa are you using? And can you try passing the --debug flag as well?

Version of rasa is 1.3.6

Sorry for inconvenience here @akelad. But i got the following command running sudo docker run \ -v $(pwd)/models:/app/models \ rasa/rasa:latest-full \ run --enable-api -m models/20190930-103430.tar.gz All i needed was to find IP of docker.

But still the NoneType error persists. Here i tried using debug but cannot figure out what is happening with the command

sudo docker run -v $(pwd)/models:/app/models rasa/rasa:latest-full  run --enable-api -m models/nlu-20191001-163401.tar.gz --debug

Here is the output of it

No chat connector configured, falling back to the REST input channel. To connect your bot to another channel, read the docs here: https://rasa.com/docs/rasa/user-guide/messaging-and-voice-channels
2019-10-02 10:25:11 DEBUG    rasa.core.utils  - Available web server routes: 
/conversations/<conversation_id>/messages          POST                           add_message
/conversations/<conversation_id>/tracker/events    POST                           append_events
/webhooks/rest                                     GET                            custom_webhook_RestInput.health
/webhooks/rest/webhook                             POST                           custom_webhook_RestInput.receive
/model/test/intents                                POST                           evaluate_intents
/model/test/stories                                POST                           evaluate_stories
/conversations/<conversation_id>/execute           POST                           execute_action
/domain                                            GET                            get_domain
/                                                  GET                            hello
/model                                             PUT                            load_model
/model/parse                                       POST                           parse
/conversations/<conversation_id>/predict           POST                           predict
/conversations/<conversation_id>/tracker/events    PUT                            replace_events
/conversations/<conversation_id>/story             GET                            retrieve_story
/conversations/<conversation_id>/tracker           GET                            retrieve_tracker
/status                                            GET                            status
/model/predict                                     POST                           tracker_predict
/model/train                                       POST                           train
/model                                             DELETE                         unload_model
/version                                           GET                            version
2019-10-02 10:25:11 INFO     root  - Starting Rasa server on http://localhost:5005
2019-10-02 10:25:11 INFO     root  - Enabling coroutine debugging. Loop id 94458932681736.
2019-10-02 10:25:11 DEBUG    rasa.model  - Extracted model to '/tmp/tmpat4vifvq'.
2019-10-02 10:25:23 INFO     rasa.nlu.components  - Added 'SpacyNLP' to component cache. Key 'SpacyNLP-en'.
2019-10-02 10:25:23 DEBUG    rasa.core.tracker_store  - Connected to InMemoryTrackerStore.
2019-10-02 10:25:23 DEBUG    rasa.core.lock_store  - Connected to lock store 'InMemoryLockStore'.
2019-10-02 10:25:23 DEBUG    rasa.model  - Extracted model to '/tmp/tmprpfkx96j'.
2019-10-02 10:25:38 DEBUG    rasa.core.processor  - Received user message 'Hello, I am Rasa!' with intent '{'name': 'story', 'confidence': 0.993598222732544}' and entities '[{'start': 0, 'end': 8, 'value': 'hello, i', 'entity': 'Historical places', 'confidence': 0.7112877987135917, 'extractor': 'CRFEntityExtractor'}]'
[2019-10-02 10:25:38 +0000] [1] [ERROR] Exception occurred in one of response middleware handlers
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 958, in handle_request
    request, response
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/spf/framework.py", line 579, in _run_response_middleware
    _response = await _response
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/extension.py", line 266, in unapplied_cors_response_middleware
    set_cors_headers(req, resp, context, res_options)
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 251, in set_cors_headers
    headers_to_set = get_cors_headers(options, req.headers, req.method)
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 171, in get_cors_headers
    origins_to_set = get_cors_origins(options, request_headers.get('Origin'))
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 146, in get_cors_origins
    return sorted([o for o in origins if not probably_regex(o)])
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 146, in <listcomp>
    return sorted([o for o in origins if not probably_regex(o)])
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 275, in probably_regex
    return any((c in maybe_regex for c in common_regex_chars))
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 275, in <genexpr>
    return any((c in maybe_regex for c in common_regex_chars))
TypeError: argument of type 'NoneType' is not iterable

@Akshay23 so this is an issue we noticed which can temporarily be fixed by passing --cors "*" as an additional flag. We’re also working on getting a proper fix out

Thank you for updating me here for the same. Will try it and let you know about it.

Edit 1:

Yes it is working as of now. Thank you for your support.