{"action":"opened","issue":{"url":"https://api.github.com/repos/src-d/lookout-sonarcheck-analyzer/issues/18","repository_url":"https://api.github.com/repos/src-d/lookout-sonarcheck-analyzer","labels_url":"https://api.github.com/repos/src-d/lookout-sonarcheck-analyzer/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/src-d/lookout-sonarcheck-analyzer/issues/18/comments","events_url":"https://api.github.com/repos/src-d/lookout-sonarcheck-analyzer/issues/18/events","html_url":"https://github.com/src-d/lookout-sonarcheck-analyzer/issues/18","id":389441575,"node_id":"MDU6SXNzdWUzODk0NDE1NzU=","number":18,"title":"Analyzer crash while logging at startup","user":{"login":"creachadair","id":19258,"node_id":"MDQ6VXNlcjE5MjU4","avatar_url":"https://avatars1.githubusercontent.com/u/19258?v=4","gravatar_id":"","url":"https://api.github.com/users/creachadair","html_url":"https://github.com/creachadair","followers_url":"https://api.github.com/users/creachadair/followers","following_url":"https://api.github.com/users/creachadair/following{/other_user}","gists_url":"https://api.github.com/users/creachadair/gists{/gist_id}","starred_url":"https://api.github.com/users/creachadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creachadair/subscriptions","organizations_url":"https://api.github.com/users/creachadair/orgs","repos_url":"https://api.github.com/users/creachadair/repos","events_url":"https://api.github.com/users/creachadair/events{/privacy}","received_events_url":"https://api.github.com/users/creachadair/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-10T19:02:13Z","updated_at":"2018-12-10T19:02:13Z","closed_at":null,"author_association":"MEMBER","body":"From https://github.com/src-d/empathy-sessions/issues/31.\r\n\r\n**Synopsis:** The sonarcheck analyzer throws a Python exception at startup, while attempting to log (`TypeError: %d format: a number is required, not str`).\r\n\r\n**Repro:**\r\n\r\nThis is more or less following the instructions for `docker-compose` on https://github.com/src-d/lookout, with some config file tweaks. I'm running on macOS with \r\n\r\n```sh\r\n# Use [1] as config.yml\r\n# Use [2] as docker-compose.yml\r\n$ docker-compose pull\r\n$ docker-compose up --force-recreate\r\n```\r\n\r\n[1] https://gist.github.com/creachadair/9be8e1524d9ca6511c277e3ebbd7d722\r\n[2] https://gist.github.com/creachadair/f886b0b3f7a5eb8fda8c866a6b5bf96b\r\n\r\n**Expected**: Clean startup.\r\n\r\n**Observed:**\r\n\r\n```\r\nAttaching to test_sonarcheck_1, test_bblfsh_1, test_postgres_1, test_lookout_1\r\nsonarcheck_1  | --- Logging error ---\r\nsonarcheck_1  | Traceback (most recent call last):\r\nsonarcheck_1  |   File \"/usr/local/lib/python3.7/logging/__init__.py\", line 1034, in emit\r\nsonarcheck_1  |     msg = self.format(record)\r\nsonarcheck_1  |   File \"/usr/local/lib/python3.7/logging/__init__.py\", line 880, in format\r\nsonarcheck_1  |     return fmt.format(record)\r\nsonarcheck_1  |   File \"/usr/local/lib/python3.7/logging/__init__.py\", line 619, in format\r\nsonarcheck_1  |     record.message = record.getMessage()\r\nsonarcheck_1  |   File \"/usr/local/lib/python3.7/logging/__init__.py\", line 380, in getMessage\r\nsonarcheck_1  |     msg = msg % self.args\r\nsonarcheck_1  | TypeError: %d format: a number is required, not str\r\nsonarcheck_1  | Call stack:\r\nsonarcheck_1  |   File \"/bin/sonarcheck_analyzer.py\", line 117, in <module>\r\nsonarcheck_1  |     main()\r\nsonarcheck_1  |   File \"/bin/sonarcheck_analyzer.py\", line 111, in main\r\nsonarcheck_1  |     logger.info(\"starting gRPC Analyzer server at port %d\", port_to_listen)\r\nsonarcheck_1  | Message: 'starting gRPC Analyzer server at port %d'\r\nsonarcheck_1  | Arguments: ('10301',)\r\nsonarcheck_1  | 1 langs, 56 checks supported\r\n```"}}
{"actor":{"display_login":"creachadair"}}