{"action":"opened","issue":{"url":"https://api.github.com/repos/ceuk/spotui/issues/5","repository_url":"https://api.github.com/repos/ceuk/spotui","labels_url":"https://api.github.com/repos/ceuk/spotui/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/ceuk/spotui/issues/5/comments","events_url":"https://api.github.com/repos/ceuk/spotui/issues/5/events","html_url":"https://github.com/ceuk/spotui/issues/5","id":548626328,"node_id":"MDU6SXNzdWU1NDg2MjYzMjg=","number":5,"title":"TypeError raised when no songs have yet been played","user":{"login":"extremepayne","id":46696318,"node_id":"MDQ6VXNlcjQ2Njk2MzE4","avatar_url":"https://avatars2.githubusercontent.com/u/46696318?v=4","gravatar_id":"","url":"https://api.github.com/users/extremepayne","html_url":"https://github.com/extremepayne","followers_url":"https://api.github.com/users/extremepayne/followers","following_url":"https://api.github.com/users/extremepayne/following{/other_user}","gists_url":"https://api.github.com/users/extremepayne/gists{/gist_id}","starred_url":"https://api.github.com/users/extremepayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/extremepayne/subscriptions","organizations_url":"https://api.github.com/users/extremepayne/orgs","repos_url":"https://api.github.com/users/extremepayne/repos","events_url":"https://api.github.com/users/extremepayne/events{/privacy}","received_events_url":"https://api.github.com/users/extremepayne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2020-01-12T21:00:29Z","updated_at":"2020-01-12T21:00:29Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nWhen selecting \"recently played\" and nothing has yet been played (due to an inablility to play any tracks; I'm working on debugging it since it might actually be my fault, idk, if not, I'll submit a report shortly) the program craashes with the a TypeError.\r\n```\r\n❯ python3 spotui\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.5/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/usr/lib/python3.5/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"spotui/__main__.py\", line 10, in <module>\r\n    main()\r\n  File \"spotui/__main__.py\", line 6, in main\r\n    SpoTUI = curses.wrapper(App)\r\n  File \"/usr/lib/python3.5/curses/__init__.py\", line 94, in wrapper\r\n    return func(stdscr, *args, **kwds)\r\n  File \"/home/harrisonpayne/.local/lib/python3.5/site-packages/spotui/src/ui.py\", line 8, in __init__\r\n    self.main_form = MainForm(stdscr)\r\n  File \"/home/harrisonpayne/.local/lib/python3.5/site-packages/spotui/src/MainForm.py\", line 98, in __init__\r\n    key)\r\n  File \"/home/user/.local/lib/python3.5/site-packages/spotui/src/LibraryMenu.py\", line 61, in receive_input\r\n    self.items[self.component.selected][\"handler\"]()\r\n  File \"/home/user/.local/lib/python3.5/site-packages/spotui/src/LibraryMenu.py\", line 54, in __select_recent_tracks\r\n    \"Recently Played\")\r\n  File \"/home/user/.local/lib/python3.5/site-packages/spotui/src/MainForm.py\", line 123, in change_tracklist\r\n    self.components[0].update_tracks(tracks, title)\r\n  File \"/home/user/.local/lib/python3.5/site-packages/spotui/src/TracksMenu.py\", line 30, in update_tracks\r\n    self.items = list(map(self.__map_tracks, tracks))\r\nTypeError: 'NoneType' object is not iterable\r\n```\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Fresh install\r\n2. Don't play any tracks\r\n3. Select \"Recently played\"\r\n\r\n**Expected behavior**\r\nThe program should fail gracefully. \r\n\r\n**Desktop (please complete the following information):**\r\n - OS: ChromeOS 79 with Debian Stretch VM (via native \"linux (beta)\" feature)\r\n- Browser: Chrome 79\r\n\r\n\r\n**Additional context**\r\nI think that covers it.\r\n"}}
{"actor":{"display_login":"extremepayne"}}