{"action":"reopened","issue":{"url":"https://api.github.com/repos/opsdroid/opsdroid/issues/247","repository_url":"https://api.github.com/repos/opsdroid/opsdroid","labels_url":"https://api.github.com/repos/opsdroid/opsdroid/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/opsdroid/opsdroid/issues/247/comments","events_url":"https://api.github.com/repos/opsdroid/opsdroid/issues/247/events","html_url":"https://github.com/opsdroid/opsdroid/issues/247","id":261869439,"number":247,"title":"SIGINT (Ctrl+C) should be handled by opsdroid","user":{"login":"gtseres","id":8204987,"avatar_url":"https://avatars3.githubusercontent.com/u/8204987?v=4","gravatar_id":"","url":"https://api.github.com/users/gtseres","html_url":"https://github.com/gtseres","followers_url":"https://api.github.com/users/gtseres/followers","following_url":"https://api.github.com/users/gtseres/following{/other_user}","gists_url":"https://api.github.com/users/gtseres/gists{/gist_id}","starred_url":"https://api.github.com/users/gtseres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtseres/subscriptions","organizations_url":"https://api.github.com/users/gtseres/orgs","repos_url":"https://api.github.com/users/gtseres/repos","events_url":"https://api.github.com/users/gtseres/events{/privacy}","received_events_url":"https://api.github.com/users/gtseres/received_events","type":"User","site_admin":false},"labels":[{"id":413084777,"url":"https://api.github.com/repos/opsdroid/opsdroid/labels/bug","name":"bug","color":"ee0701","default":true},{"id":688005223,"url":"https://api.github.com/repos/opsdroid/opsdroid/labels/intermediate","name":"intermediate","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-30T20:17:47Z","updated_at":"2017-10-02T07:16:40Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When executing opsdroid in Ubuntu or in a Docker container, the following message appears:\r\n`(Press CTRL+C to quit)`\r\n\r\nWhen hitting `Ctrl+C` though, the following traceback is produced:\r\n\r\n```\r\n^CERROR asyncio: Task exception was never retrieved\r\nfuture: <Task finished coro=<ConnectorShell.listen() done, defined at /root/.opsdroid/modules/opsdroid-modules/connector/shell/__init__.py:57> exception=ConnectionResetError('Connection lost',)>\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/asyncio/tasks.py\", line 240, in _step\r\n    result = coro.send(None)\r\n  File \"/root/.opsdroid/modules/opsdroid-modules/connector/shell/__init__.py\", line 63, in listen\r\n    user_input = await async_input('', opsdroid.eventloop)\r\n  File \"/root/.opsdroid/modules/opsdroid-modules/connector/shell/__init__.py\", line 37, in async_input\r\n    await writer.drain()\r\n  File \"/usr/local/lib/python3.5/asyncio/streams.py\", line 333, in drain\r\n    yield from self._protocol._drain_helper()\r\n  File \"/usr/local/lib/python3.5/asyncio/streams.py\", line 204, in _drain_helper\r\n    raise ConnectionResetError('Connection lost')\r\nConnectionResetError: Connection lost\r\nERROR asyncio: Exception in default exception handler\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 1284, in call_exception_handler\r\n    self.default_exception_handler(context)\r\n  File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 1259, in default_exception_handler\r\n    logger.error('\\n'.join(log_lines), exc_info=exc_info)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1314, in error\r\n    self._log(ERROR, msg, args, **kwargs)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1421, in _log\r\n    self.handle(record)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1431, in handle\r\n    self.callHandlers(record)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1493, in callHandlers\r\n    hdlr.handle(record)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 861, in handle\r\n    self.emit(record)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1053, in emit\r\n    self.stream = self._open()\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1043, in _open\r\n    return open(self.baseFilename, self.mode, encoding=self.encoding)\r\nNameError: name 'open' is not defined\r\nException ignored in: <bound method Task.__del__ of <Task finished coro=<ConnectorShell.listen() done, defined at /root/.opsdroid/modules/opsdroid-modules/connector/shell/__init__.py:57> exception=ConnectionResetError('Connection lost',)>>\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/asyncio/tasks.py\", line 93, in __del__\r\n  File \"/usr/local/lib/python3.5/asyncio/futures.py\", line 234, in __del__\r\n  File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 1290, in call_exception_handler\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1314, in error\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1421, in _log\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1431, in handle\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1493, in callHandlers\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 861, in handle\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1053, in emit\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1043, in _open\r\nNameError: name 'open' is not defined\r\nERROR asyncio: Task was destroyed but it is pending!\r\ntask: <Task pending coro=<parse_crontab() running at /usr/src/app/opsdroid/parsers/crontab.py:20> wait_for=<Future pending cb=[Task._wakeup()]>>\r\nERROR asyncio: Exception in default exception handler\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 1284, in call_exception_handler\r\n    self.default_exception_handler(context)\r\n  File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 1259, in default_exception_handler\r\n    logger.error('\\n'.join(log_lines), exc_info=exc_info)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1314, in error\r\n    self._log(ERROR, msg, args, **kwargs)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1421, in _log\r\n    self.handle(record)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1431, in handle\r\n    self.callHandlers(record)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1493, in callHandlers\r\n    hdlr.handle(record)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 861, in handle\r\n    self.emit(record)\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1053, in emit\r\n    self.stream = self._open()\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1043, in _open\r\n    return open(self.baseFilename, self.mode, encoding=self.encoding)\r\nNameError: name 'open' is not defined\r\nException ignored in: <bound method Task.__del__ of <Task pending coro=<parse_crontab() running at /usr/src/app/opsdroid/parsers/crontab.py:20> wait_for=<Future pending cb=[Task._wakeup()]>>>\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/asyncio/tasks.py\", line 92, in __del__\r\n  File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 1290, in call_exception_handler\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1314, in error\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1421, in _log\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1431, in handle\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1493, in callHandlers\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 861, in handle\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1053, in emit\r\n  File \"/usr/local/lib/python3.5/logging/__init__.py\", line 1043, in _open\r\nNameError: name 'open' is not defined\r\n```\r\n\r\nThis should be handled, so that opsdroid can exit gracefully without producing any tracebacks."}}
{"actor":{"display_login":"jacobtomlinson"}}