Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if existing library ID for any reason is not returned by get_libraries #370

Open
oddstr13 opened this issue Aug 24, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@oddstr13
Copy link
Member

Describe the bug

To Reproduce

  1. Sync libraries
  2. Delete library in Jellyfin
  3. Trigger new sync

Expected behavior

Logs

2020-08-24 01:13:19.100 T:2493506416  NOTICE: JELLYFIN.database -> ERROR::jellyfin_kodi/database/__init__.py:186 type: <type 'exceptions.ValueError'> value: u'3ea17cff75a309cabede44ee3a92f942' is not in list
2020-08-24 01:13:19.111 T:2614596464  NOTICE: JELLYFIN.full_sync -> INFO::jellyfin_kodi/full_sync.py:58 -->[ fullsync ]
2020-08-24 01:13:19.123 T:2493506416   ERROR: Exception in thread Thread-5:
                                            Traceback (most recent call last):
                                              File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/library.py", line 85, in run
                                                if not self.startup():
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/library.py", line 308, in startup
                                                Views().get_nodes()
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 246, in get_nodes
                                                self.add_nodes(node_path, view)
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 303, in add_nodes
                                                self.node_index(folder, view, mixed)
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 374, in node_index
                                                index = self.sync['SortedViews'].index(view['Id'])
                                            ValueError: u'3ea17cff75a309cabede44ee3a92f942' is not in list
2020-08-24 01:13:19.135 T:2614596464  NOTICE: JELLYFIN.helper.wrapper -> INFO::jellyfin_kodi/helper/wrapper.py:36 Processing Removing library
2020-08-24 01:13:19.171 T:2614596464  NOTICE: JELLYFIN.full_sync -> INFO::jellyfin_kodi/full_sync.py:580 --<[ fullsync ]
2020-08-24 01:13:19.619 T:2614596464  NOTICE: JELLYFIN.database -> ERROR::jellyfin_kodi/database/__init__.py:186 type: <type 'exceptions.ValueError'> value: u'3ea17cff75a309cabede44ee3a92f942' is not in list
2020-08-24 01:13:19.626 T:2614596464   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: u'3ea17cff75a309cabede44ee3a92f942' is not in list
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/entrypoint/service.py", line 296, in onNotification
                                                if not self.library_thread.remove_library(lib):
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/library.py", line 534, in remove_library
                                                Views().get_nodes()
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 246, in get_nodes
                                                self.add_nodes(node_path, view)
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 303, in add_nodes
                                                self.node_index(folder, view, mixed)
                                              File "/storage/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 374, in node_index
                                                index = self.sync['SortedViews'].index(view['Id'])
                                            ValueError: u'3ea17cff75a309cabede44ee3a92f942' is not in list
                                            -->End of Python script error report<--
2020-08-24 01:13:19.636 T:2614596464  NOTICE: JELLYFIN.full_sync -> INFO::jellyfin_kodi/full_sync.py:58 -->[ fullsync ]
2020-08-24 01:13:19.657 T:2614596464  NOTICE: JELLYFIN.helper.wrapper -> INFO::jellyfin_kodi/helper/wrapper.py:36 Processing Removing library
2020-08-24 01:13:33.275 T:3011589456   ERROR: Control 50 in window 10025 has been asked to focus, but it can't

Screenshots

System (please complete the following information):

  • OS: any
  • Jellyfin Version: 10.6.3
  • Kodi Version: any
  • Addon Version: master
  • Playback Mode: n/a

Additional context

This issue gained my attention due to #352 but probably also happened due to #297

@oddstr13 oddstr13 added bug Something isn't working blocker This is blocking a release or project labels Aug 24, 2020
oddstr13 added a commit to oddstr13/jellyfin-kodi that referenced this issue Aug 24, 2020
@oddstr13 oddstr13 removed the blocker This is blocking a release or project label Aug 24, 2020
TrueTechy added a commit that referenced this issue Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants