Repository: rasahq/rasa
Issue: Interactive learning has Server Error Hosting on Docker 

Hi,
I am trying the latest rasa in docker, and trapped by the error.

the cmds (running in powershell on win10) as follows:
```
docker run --rm -v ${pwd}:/app rasa/rasa init --no-prompt
docker run -it --rm -v ${pwd}:/app rasa/rasa interactive
```

and the error shows here:
```
PS D:\\projects\\chatbot\\demo> docker run -it --rm -v ${pwd}:/app rasa/rasa interactive
Nothing changed. You can use the old model stored at '/app/models/20190730-083403.tar.gz'.
Bot loaded. Visualisation at http://localhost:5006/visualization.html.
Type a message and press enter (press 'Ctr-c' to exit). 
Processed Story Blocks: 100%|████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 1148.18it/s, # trackers=1]? Your input -> hi
? Your NLU model classified 'hi' with intent 'greet' and there are no entities, is this correct?  Yes

------
Chat History

 #    Bot                        You       
────────────────────────────────────────────
 1    action_listen
────────────────────────────────────────────
 2                                       hi
                         intent: greet 0.96
------
? The bot wants to run 'utter_greet', correct?  Yes
2019-07-30 08:34:53 ERROR    rasa.core.training.interactive  - failed to execute action!
2019-07-30 08:34:53 ERROR    rasa.core.training.interactive  - An exception occurred while recording messages.
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 1388, in record_messages
    endpoint, sender_id, sender_ids, plot_file
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 906, in _predict_till_next_listen
    action_name, policy, confidence, predictions, endpoint, sender_id
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 1075, in _validate_action
    await send_action(endpoint, sender_id, action_name, policy, confidence)
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 195, in send_action
    return await endpoint.request(json=payload, method="post", subpath=subpath)
  File "/usr/local/lib/python3.6/site-packages/rasa/utils/endpoints.py", line 148, in request
    resp.status, resp.reason, await resp.content.read()
rasa.utils.endpoints.ClientResponseError: 500, Internal Server Error, body='b'{"version":"1.1.8","status":"failure","message":"An unexpected error occurred. Error: \\'Sanic\\' object has no attribute \\'input_channels\\'","reason":"ConversationError","details":{},"help":null,"code":500}''
2019-07-30 08:34:53 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<_serve_application.<locals>.run_interactive_io() done, defined at /usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py:1430> exception=ClientResponseError('500, Internal Server Error, body=\\'b\\'{"version":"1.1.8","status":"failure","message":"An unexpected error occurred. Error: \\\\\\'Sanic\\\\\\' object has no attribute \\\\\\'input_channels\\\\\\'","reason":"ConversationError","details":{},"help":null,"code":500}\\'\\'',)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 1437, in run_interactive_io
    sender_id=uuid.uuid4().hex,
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 1388, in record_messages
    endpoint, sender_id, sender_ids, plot_file
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 906, in _predict_till_next_listen
    action_name, policy, confidence, predictions, endpoint, sender_id
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 1075, in _validate_action
    await send_action(endpoint, sender_id, action_name, policy, confidence)
  File "/usr/local/lib/python3.6/site-packages/rasa/core/training/interactive.py", line 195, in send_action
    return await endpoint.request(json=payload, method="post", subpath=subpath)
  File "/usr/local/lib/python3.6/site-packages/rasa/utils/endpoints.py", line 148, in request
    resp.status, resp.reason, await resp.content.read()
rasa.utils.endpoints.ClientResponseError: 500, Internal Server Error, body='b'{"version":"1.1.8","status":"failure","message":"An unexpected error occurred. Error: \\'Sanic\\' object has no attribute \\'input_channels\\'","reason":"ConversationError","details":{},"help":null,"code":500}''
```

Changed files:
tests/test_server.py, rasa/server.py

diff --git a/rasa/server.py b/rasa/server.py
index fb88e54798f..9b8b5812e3b 100644
--- a/rasa/server.py
+++ b/rasa/server.py
@@ -930,7 +930,8 @@ def _get_output_channel(
     ):
         requested_output_channel = tracker.get_latest_input_channel()
 
-    registered_input_channels = request.app.input_channels or []
+    # Interactive training does not set `input_channels`, hence we have to be cautious
+    registered_input_channels = getattr(request.app, "input_channels", None) or []
     matching_channels = [
         channel
         for channel in registered_input_channels
diff --git a/tests/test_server.py b/tests/test_server.py
index 2b9da7efd13..e7ba16fad3e 100644
--- a/tests/test_server.py
+++ b/tests/test_server.py
@@ -825,3 +825,17 @@ def test_get_latest_output_channel(input_channels: List[Text], expected_channel:
     actual = rasa.server._get_output_channel(request, tracker)
 
     assert isinstance(actual, expected_channel)
+
+
+def test_app_when_app_has_no_input_channels():
+    request = MagicMock()
+
+    class NoInputChannels:
+        pass
+
+    request.app = NoInputChannels()
+
+    actual = rasa.server._get_output_channel(
+        request, DialogueStateTracker.from_events("default", [])
+    )
+    assert isinstance(actual, CollectingOutputChannel)