sindrig / spoppy

A spotify CLI written in python
MIT License
12 stars 4 forks source link

VP (View Playlists) loads and crashes #174

Closed gunnardag closed 6 years ago

gunnardag commented 6 years ago

`Loading............................................................ Exception in thread Thread-3944: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/local/lib/python3.6/dist-packages/spoppy/loaders/loader.py", line 68, in run logger.debug('Got these keys: %s', response_data.keys()) AttributeError: 'NoneType' object has no attribute 'keys'

Traceback (most recent call last): File "/usr/local/bin/spoppy", line 11, in main() File "/home/gunnar/.local/lib/python3.6/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/home/gunnar/.local/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/gunnar/.local/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/gunnar/.local/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/spoppy/init.py", line 69, in main navigator.start() File "/usr/local/lib/python3.6/dist-packages/spoppy/navigation.py", line 67, in start self.navigate_to(main_menu) File "/usr/local/lib/python3.6/dist-packages/spoppy/navigation.py", line 105, in navigate_to self.navigate_to(response) File "/usr/local/lib/python3.6/dist-packages/spoppy/navigation.py", line 110, in navigate_to going.initialize() File "/usr/local/lib/python3.6/dist-packages/spoppy/menus.py", line 125, in initialize self._options = Options(self.get_options()) File "/usr/local/lib/python3.6/dist-packages/spoppy/menus.py", line 326, in get_options self.loader.results, AttributeError: 'PlaylistLoader' object has no attribute 'results'`

sindrig commented 6 years ago

Seems like the loader is not returning anything, which is strange seeing we're using a plain spotipy instance. Can you upload your ~/.cache/spoppy/spoppy.log after you reproduce the error?

gunnardag commented 6 years ago

Nothing of value was being added to the spoppy.log during the crash.

A new error has occurred, which happens instantly (not like before when I had to wait half minute before the crash) when viewing playlists with "vp". It also has happened when successfully viewing playlists, viewing a certain playlist and then going back with "u" Here is the crashlog Traceback (most recent call last): File "/usr/local/bin/spoppy", line 11, in <module> main() File "/home/gunnar/.local/lib/python3.6/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/home/gunnar/.local/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/gunnar/.local/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/gunnar/.local/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/spoppy/__init__.py", line 69, in main navigator.start() File "/usr/local/lib/python3.6/dist-packages/spoppy/navigation.py", line 67, in start self.navigate_to(main_menu) File "/usr/local/lib/python3.6/dist-packages/spoppy/navigation.py", line 105, in navigate_to self.navigate_to(response) File "/usr/local/lib/python3.6/dist-packages/spoppy/navigation.py", line 110, in navigate_to going.initialize() File "/usr/local/lib/python3.6/dist-packages/spoppy/menus.py", line 125, in initialize self._options = Options(self.get_options()) File "/usr/local/lib/python3.6/dist-packages/spoppy/menus.py", line 327, in get_options key=get_name TypeError: '<' not supported between instances of 'str' and 'NoneType'

sindrig commented 6 years ago

Can you try updating to 2.3.2, and run spoppy using SPOPPY_LOG_LEVEL=debug spoppy (note that this will log a lot). If you encounter the error (or get the error message While fetching data from spotify, we got no results,...), please update this issue with the contents of your ~/.cache/spoppy/spoppy.log

gunnardag commented 6 years ago

2018-05-31 22:11:50,431 - spoppy.menus - DEBUG - Trying to match u 2018-05-31 22:11:50,431 - spoppy.menus - DEBUG - possibilities_key: ['u'] 2018-05-31 22:11:50,431 - spoppy.menus - DEBUG - possibilities_name: [' 1', ' 2', ' 4', ' 8', ' 9', ' 10', ' 12', ' 18', ' 19', ' 20', ' 23', ' 30', ' 31', ' 33', ' 35', ' 36', ' 39', ' 41', ' 44', ' 50', ' 52', ' 56', ' 61', ' 66', ' 67', ' 68', ' 69', ' 70', ' 71', ' 73', ' 74', ' 75', ' 77', ' 79', ' 82', ' 83', ' 84', ' 85', ' 87', ' 88', ' 92', ' 93', ' 94', ' 97', ' 100', 'sp', 'q'] 2018-05-31 22:11:50,432 - spoppy.menus - DEBUG - Trying to match (u) 2018-05-31 22:11:50,432 - spoppy.menus - DEBUG - Pattern u found in cache 2018-05-31 22:11:50,432 - spoppy.menus - DEBUG - Available possibilities: [' 36', 'sp', ' 44', ' 19', ' 74', ' 31', 'u', ' 18', ' 85', ' 92', ' 39', ' 75', ' 8', ' 41', ' 100', ' 94', ' 20', ' 23', ' 87', ' 4', ' 12', ' 73', 'q', ' 68', ' 2', ' 67', ' 33', ' 79', ' 83', ' 88', ' 35', ' 84', ' 93', ' 61', ' 97', ' 9', ' 50', ' 52', ' 56', ' 77', ' 30', ' 66', ' 10', ' 70', ' 82', ' 69', ' 71', ' 1'] 2018-05-31 22:11:50,432 - spoppy.menus - DEBUG - Pattern matches stripped key, returning key u 2018-05-31 22:11:50,766 - spoppy.menus - DEBUG - Trying to match (u) 2018-05-31 22:11:50,766 - spoppy.menus - DEBUG - Pattern u found in cache 2018-05-31 22:11:50,766 - spoppy.menus - DEBUG - Available possibilities: [' 36', 'sp', ' 44', ' 19', ' 74', ' 31', 'u', ' 18', ' 85', ' 92', ' 39', ' 75', ' 8', ' 41', ' 100', ' 94', ' 20', ' 23', ' 87', ' 4', ' 12', ' 73', 'q', ' 68', ' 2', ' 67', ' 33', ' 79', ' 83', ' 88', ' 35', ' 84', ' 93', ' 61', ' 97', ' 9', ' 50', ' 52', ' 56', ' 77', ' 30', ' 66', ' 10', ' 70', ' 82', ' 69', ' 71', ' 1'] 2018-05-31 22:11:50,767 - spoppy.menus - DEBUG - Pattern matches stripped key, returning key u 2018-05-31 22:11:50,767 - spoppy.lifecycle - DEBUG - Logging user out after quit... 2018-05-31 22:11:50,772 - spoppy.lifecycle - DEBUG - Closing dbus_listener 2018-05-31 22:11:50,772 - spoppy.lifecycle - DEBUG - Joining <DBusListener(Thread-1, started 140320627238656)> 2018-05-31 22:11:50,773 - spoppy.dbus_listener - DEBUG - Kill signal received, stopping service 2018-05-31 22:11:50,773 - spoppy.dbus_listener - DEBUG - Joining service thread with timeout 10s 2018-05-31 22:11:50,774 - spoppy.lifecycle - DEBUG - Joining <ResizeChecker(Thread-2, stopped 140320272545536)> 2018-05-31 22:11:50,774 - spoppy.lifecycle - DEBUG - Checking connection state 0 2018-05-31 22:11:50,775 - spoppy.lifecycle - DEBUG - All services joined 2018-05-31 22:11:50,775 - spoppy.lifecycle - DEBUG - Received connection state LOGGED_OUT 2018-05-31 22:11:50,776 - spoppy.lifecycle - DEBUG - Pyspotify session loop stopped 2018-05-31 22:11:50,776 - spoppy.navigation - DEBUG - Navigation shutdown complete 2018-05-31 22:11:50,776 - spoppy.main - DEBUG - Finally, bye!

sindrig commented 6 years ago

Released V2.3.5. See if it resolves your problem.