{"action":"created","issue":{"url":"https://api.github.com/repos/rachmadaniHaryono/python-mal/issues/6","repository_url":"https://api.github.com/repos/rachmadaniHaryono/python-mal","labels_url":"https://api.github.com/repos/rachmadaniHaryono/python-mal/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/rachmadaniHaryono/python-mal/issues/6/comments","events_url":"https://api.github.com/repos/rachmadaniHaryono/python-mal/issues/6/events","html_url":"https://github.com/rachmadaniHaryono/python-mal/issues/6","id":178594006,"number":6,"title":"Errors while parsing not yet aired anime","user":{"login":"rr-","id":1045476,"avatar_url":"https://avatars.githubusercontent.com/u/1045476?v=3","gravatar_id":"","url":"https://api.github.com/users/rr-","html_url":"https://github.com/rr-","followers_url":"https://api.github.com/users/rr-/followers","following_url":"https://api.github.com/users/rr-/following{/other_user}","gists_url":"https://api.github.com/users/rr-/gists{/gist_id}","starred_url":"https://api.github.com/users/rr-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rr-/subscriptions","organizations_url":"https://api.github.com/users/rr-/orgs","repos_url":"https://api.github.com/users/rr-/repos","events_url":"https://api.github.com/users/rr-/events{/privacy}","received_events_url":"https://api.github.com/users/rr-/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-22T12:16:11Z","updated_at":"2016-09-22T14:49:21Z","closed_at":null,"body":"The library has problems while parsing media with `N/A` in sidebar such as [this one](https://myanimelist.net/anime/32995/Yuri_on_Ice).\r\n\r\n```console\r\n(_ve) rr-@cyclone:~/src/mal$ cat test\r\n#!/bin/env python3\r\nfrom myanimelist.session import Session\r\ns = Session()\r\nprint(s.anime(32995).title)\r\n\r\n(_ve) rr-@cyclone:~/src/mal$ ./test\r\nTraceback (most recent call last):\r\n  File \"/home/rr-/src/mal/_ve/src/master/myanimelist/media.py\", line 263, in parse_sidebar\r\n    media_info['score'] = (decimal.Decimal(score_point), num_users)\r\n  File \"/usr/lib64/python3.5/_pydecimal.py\", line 597, in __new__\r\n    \"Invalid literal for Decimal: %r\" % value)\r\n  File \"/usr/lib64/python3.5/_pydecimal.py\", line 4032, in _raise_error\r\n    raise error(explanation)\r\ndecimal.InvalidOperation: Invalid literal for Decimal: 'N/A'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"./test\", line 4, in <module>\r\n    print(s.anime(32995).title)\r\n  File \"/home/rr-/src/mal/_ve/src/master/myanimelist/base.py\", line 86, in _decorator\r\n    getattr(self, func_name)()\r\n  File \"/home/rr-/src/mal/_ve/src/master/myanimelist/media.py\", line 672, in load\r\n    self.set(self.parse(utilities.get_clean_dom(media_page), media_page_original))\r\n  File \"/home/rr-/src/mal/_ve/src/master/myanimelist/media.py\", line 412, in parse\r\n    media_info = self.parse_sidebar(media_page, media_page_original)\r\n  File \"/home/rr-/src/mal/_ve/src/master/myanimelist/anime.py\", line 115, in parse_sidebar\r\n    anime_info = super(Anime, self).parse_sidebar(anime_page, anime_page_original)\r\n  File \"/home/rr-/src/mal/_ve/src/master/myanimelist/media.py\", line 266, in parse_sidebar\r\n    media_info['score'] = (decimal.Decimal(score_tag.text), num_users)\r\n  File \"/usr/lib64/python3.5/_pydecimal.py\", line 597, in __new__\r\n    \"Invalid literal for Decimal: %r\" % value)\r\n  File \"/usr/lib64/python3.5/_pydecimal.py\", line 4032, in _raise_error\r\n    raise error(explanation)\r\ndecimal.InvalidOperation: Invalid literal for Decimal: 'N/A'\r\n```"},"comment":{"url":"https://api.github.com/repos/rachmadaniHaryono/python-mal/issues/comments/248926121","html_url":"https://github.com/rachmadaniHaryono/python-mal/issues/6#issuecomment-248926121","issue_url":"https://api.github.com/repos/rachmadaniHaryono/python-mal/issues/6","id":248926121,"user":{"login":"rachmadaniHaryono","id":6340878,"avatar_url":"https://avatars.githubusercontent.com/u/6340878?v=3","gravatar_id":"","url":"https://api.github.com/users/rachmadaniHaryono","html_url":"https://github.com/rachmadaniHaryono","followers_url":"https://api.github.com/users/rachmadaniHaryono/followers","following_url":"https://api.github.com/users/rachmadaniHaryono/following{/other_user}","gists_url":"https://api.github.com/users/rachmadaniHaryono/gists{/gist_id}","starred_url":"https://api.github.com/users/rachmadaniHaryono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachmadaniHaryono/subscriptions","organizations_url":"https://api.github.com/users/rachmadaniHaryono/orgs","repos_url":"https://api.github.com/users/rachmadaniHaryono/repos","events_url":"https://api.github.com/users/rachmadaniHaryono/events{/privacy}","received_events_url":"https://api.github.com/users/rachmadaniHaryono/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T14:49:21Z","updated_at":"2016-09-22T14:49:21Z","body":"thank for the bug report. the fix is complete on 19a7e32f0382c5b3f13d0294e83610d688995b30.\r\n\r\ncan you test it again and check if there is any other error."}}
{"actor":{"display_login":"rachmadaniHaryono"}}