{"action":"created","issue":{"url":"https://api.github.com/repos/wiki-ai/revscoring/issues/212","repository_url":"https://api.github.com/repos/wiki-ai/revscoring","labels_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/212/comments","events_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/212/events","html_url":"https://github.com/wiki-ai/revscoring/issues/212","id":117893484,"number":212,"title":"Make all datasource/feature/dependencies-generally and their value JSONable","user":{"login":"halfak","id":984301,"avatar_url":"https://avatars.githubusercontent.com/u/984301?v=3","gravatar_id":"","url":"https://api.github.com/users/halfak","html_url":"https://github.com/halfak","followers_url":"https://api.github.com/users/halfak/followers","following_url":"https://api.github.com/users/halfak/following{/other_user}","gists_url":"https://api.github.com/users/halfak/gists{/gist_id}","starred_url":"https://api.github.com/users/halfak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halfak/subscriptions","organizations_url":"https://api.github.com/users/halfak/orgs","repos_url":"https://api.github.com/users/halfak/repos","events_url":"https://api.github.com/users/halfak/events{/privacy}","received_events_url":"https://api.github.com/users/halfak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wiki-ai/revscoring/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-19T19:49:04Z","updated_at":"2016-02-23T23:02:25Z","closed_at":null,"body":"Right now, many datasources return values that cannot be encoded in JSON. \r\n\r\nThis is a bummer because it would be better if we could use the JSON serializer within ORES's celery.  \r\n\r\nThis is the error we get when trying to use the JSON serializer within ORES for non-JSON serializable datasources:\r\n```\r\n3784623 HTTP/1.1\" 500 -\r\nTraceback (most recent call last):\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/app.py\", line 1836, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/app.py\", line 1820, in wsgi_app\r\n    response = self.make_response(self.handle_exception(e))\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/app.py\", line 1403, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/app.py\", line 1817, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/app.py\", line 1477, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/app.py\", line 1381, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/app.py\", line 1475, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/flask/app.py\", line 1461, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/home/halfak/projects/ores/ores/wsgi/routes/scores.py\", line 102, in score_revisions\r\n    precache=precache)\r\n  File \"/home/halfak/projects/ores/ores/score_processors/score_processor.py\", line 25, in score\r\n    scores = self._score(context, model, rev_ids, caches=caches)\r\n  File \"/home/halfak/projects/ores/ores/score_processors/celery.py\", line 146, in _score\r\n    caches=caches))\r\n  File \"/home/halfak/projects/ores/ores/score_processors/celery.py\", line 97, in _score_in_celery\r\n    task_id=id_string\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/celery/app/task.py\", line 559, in apply_async\r\n    **dict(self._get_exec_options(), **options)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/celery/app/base.py\", line 353, in send_task\r\n    reply_to=reply_to or self.oid, **options\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/celery/app/amqp.py\", line 305, in publish_task\r\n    **kwargs\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/kombu/messaging.py\", line 165, in publish\r\n    compression, headers)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/kombu/messaging.py\", line 241, in _prepare\r\n    body) = dumps(body, serializer=serializer)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/kombu/serialization.py\", line 164, in dumps\r\n    payload = encoder(data)\r\n  File \"/usr/lib/python3.4/contextlib.py\", line 77, in __exit__\r\n    self.gen.throw(type, value, traceback)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/kombu/serialization.py\", line 59, in _reraise_errors\r\n    reraise(wrapper, wrapper(exc), sys.exc_info()[2])\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/kombu/five.py\", line 132, in reraise\r\n    raise value.with_traceback(tb)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/kombu/serialization.py\", line 55, in _reraise_errors\r\n    yield\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/kombu/serialization.py\", line 164, in dumps\r\n    payload = encoder(data)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/anyjson/__init__.py\", line 141, in dumps\r\n    return implementation.dumps(value)\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/anyjson/__init__.py\", line 89, in dumps\r\n    raise TypeError(TypeError(*exc.args)).with_traceback(sys.exc_info()[2])\r\n  File \"/home/halfak/env/3.4/lib/python3.4/site-packages/anyjson/__init__.py\", line 87, in dumps\r\n    return self._encode(data)\r\n  File \"/usr/lib/python3.4/json/__init__.py\", line 230, in dumps\r\n    return _default_encoder.encode(obj)\r\n  File \"/usr/lib/python3.4/json/encoder.py\", line 192, in encode\r\n    chunks = self.iterencode(o, _one_shot=True)\r\n  File \"/usr/lib/python3.4/json/encoder.py\", line 250, in iterencode\r\n    return _iterencode(o, 0)\r\nkombu.exceptions.EncodeError: keys must be a string\r\n```"},"comment":{"url":"https://api.github.com/repos/wiki-ai/revscoring/issues/comments/187955034","html_url":"https://github.com/wiki-ai/revscoring/issues/212#issuecomment-187955034","issue_url":"https://api.github.com/repos/wiki-ai/revscoring/issues/212","id":187955034,"user":{"login":"Ladsgroup","id":5351225,"avatar_url":"https://avatars.githubusercontent.com/u/5351225?v=3","gravatar_id":"","url":"https://api.github.com/users/Ladsgroup","html_url":"https://github.com/Ladsgroup","followers_url":"https://api.github.com/users/Ladsgroup/followers","following_url":"https://api.github.com/users/Ladsgroup/following{/other_user}","gists_url":"https://api.github.com/users/Ladsgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/Ladsgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ladsgroup/subscriptions","organizations_url":"https://api.github.com/users/Ladsgroup/orgs","repos_url":"https://api.github.com/users/Ladsgroup/repos","events_url":"https://api.github.com/users/Ladsgroup/events{/privacy}","received_events_url":"https://api.github.com/users/Ladsgroup/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T23:02:25Z","updated_at":"2016-02-23T23:02:25Z","body":"Hey, Can you give me exact steps to reproduce?"}}