{"action":"closed","issue":{"url":"https://api.github.com/repos/SickChill/SickChill/issues/4662","repository_url":"https://api.github.com/repos/SickChill/SickChill","labels_url":"https://api.github.com/repos/SickChill/SickChill/issues/4662/labels{/name}","comments_url":"https://api.github.com/repos/SickChill/SickChill/issues/4662/comments","events_url":"https://api.github.com/repos/SickChill/SickChill/issues/4662/events","html_url":"https://github.com/SickChill/SickChill/issues/4662","id":321530494,"node_id":"MDU6SXNzdWUzMjE1MzA0OTQ=","number":4662,"title":"YggTorrent bad credentials badly handled","user":{"login":"ugorenner","id":1293101,"node_id":"MDQ6VXNlcjEyOTMxMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/1293101?v=4","gravatar_id":"","url":"https://api.github.com/users/ugorenner","html_url":"https://github.com/ugorenner","followers_url":"https://api.github.com/users/ugorenner/followers","following_url":"https://api.github.com/users/ugorenner/following{/other_user}","gists_url":"https://api.github.com/users/ugorenner/gists{/gist_id}","starred_url":"https://api.github.com/users/ugorenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ugorenner/subscriptions","organizations_url":"https://api.github.com/users/ugorenner/orgs","repos_url":"https://api.github.com/users/ugorenner/repos","events_url":"https://api.github.com/users/ugorenner/events{/privacy}","received_events_url":"https://api.github.com/users/ugorenner/received_events","type":"User","site_admin":false},"labels":[{"id":1110071067,"node_id":"MDU6TGFiZWwxMTEwMDcxMDY3","url":"https://api.github.com/repos/SickChill/SickChill/labels/Old%20-%20Tag%20to%20reopen","name":"Old - Tag to reopen","color":"4cb0c9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-09T11:19:07Z","updated_at":"2018-10-30T14:29:55Z","closed_at":"2018-10-30T14:29:55Z","author_association":"NONE","body":"In case of bad credentials, response is None, so status_code check ends in exception.\r\nA cookie seems to be created anyway, so next call assume that we are logged-in.\r\n\r\nBranch/Commit: master/a7602639bd525f27475f1eeb2fc504111a14b51c\r\nOS: Synology DSM 6.1.6-15266 Update 1 \r\nBrowser: Firefox 59.0.2 on Debian 9\r\nWhat you did: Manual/backlog search on YggTorrent\r\nWhat happened: First attempt fails on login with bad behaviour, next attempts fail on bencode because of YggTorrent login error message instead of torrent data\r\nWhat you expected: Login with bad credentials correctly handled, and login retry if last failed\r\nLogs:\r\n```\r\nAA AttributeError: 'NoneType' object has no attribute 'status_code'\r\nAA if response.status_code == 401:\r\nAA File \"/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/providers/yggtorrent.py\", line 76, in login\r\nAA if not self.login():\r\nAA File \"/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/providers/yggtorrent.py\", line 99, in search\r\nAA items_list += self.search(search_string, ep_obj=episode)\r\nAA File \"/volume1/@appstore/sickbeard-custom/var/SickBeard/********/providers/GenericProvider.py\", line 155, in find_search_results\r\nAA searchResults = curProvider.find_search_results(show, episodes, search_mode, manualSearch, downCurQuality)\r\nAA File \"/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/search.py\", line 475, in searchProviders\r\n2018-05-09 12:53:52 DEBUG    SEARCHQUEUE-MANUAL-327417 :: [YggTorrent] :: Traceback (most recent call last):\r\nAA AttributeError: 'NoneType' object has no attribute 'status_code'\r\nAA if response.status_code == 401:\r\nAA File \"/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/providers/yggtorrent.py\", line 76, in login\r\nAA if not self.login():\r\nAA File \"/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/providers/yggtorrent.py\", line 99, in search\r\nAA items_list += self.search(search_string, ep_obj=episode)\r\nAA File \"/volume1/@appstore/sickbeard-custom/var/SickBeard/********/providers/GenericProvider.py\", line 155, in find_search_results\r\nAA searchResults = curProvider.find_search_results(show, episodes, search_mode, manualSearch, downCurQuality)\r\nAA File \"/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/search.py\", line 475, in searchProviders\r\nAA Traceback (most recent call last):\r\n2018-05-09 12:53:51 ERROR    SEARCHQUEUE-MANUAL-327417 :: [YggTorrent] :: [a760263] Exception while searching YggTorrent. Error: AttributeError(\"'NoneType' object has no attribute 'status_code'\",)\r\n2018-05-09 12:53:51 INFO     SEARCHQUEUE-MANUAL-327417 :: [YggTorrent] :: Request failed: 401 Client Error: Unauthorized for url: https://yggtorrent.is/user/login\r\n2018-05-09 12:53:46 INFO     SEARCHQUEUE-MANUAL-327417 :: [YggTorrent] :: Performing episode search for La casa de papel\r\n```\r\n"}}
{"actor":{"display_login":"miigotu"}}