croneter / PlexKodiConnect

Plex integration in Kodi done right
GNU General Public License v2.0
1.16k stars 77 forks source link

Invalid Setting Type Error After Upgrade To 3.5.8 #1739

Closed KYThrill closed 2 years ago

KYThrill commented 2 years ago

I run Kodi on 1 PC and 5 Nvidia Shields and use PlexKodiConnect.

All devices had been running 3.0.15. I just updated them all to 3.5.8, but have two devices (the PC and one Nvidia Shield) giving me an error "Invalid setting type" after it syncs the data on startup. I'm not sure what the cause is, or why 4 Nvidia Shields didn't report this error, but one does at every startup.

On the PC, the portion of the log that is generated when this error occurs is:

33.110 T:8072 ERROR : PLEX.utils: Error encountered: - Invalid setting type 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: _____ 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: Traceback (most recent call last): 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata.py", line 88, in run 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: self._run() 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata.py", line 74, in _run 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: self._loop() 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata.py", line 68, in _loop 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: self._process_in_batches(item_getter, processor, plex_type) 2021-12-21 00:10:33.112 T:8072 ERROR : PLEX.utils: File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata.py", line 58, in _process_in_batches 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: processor(plex_id, plex_type, self.refresh) 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata_tmdb.py", line 79, in process_trailers 2021-12-21 00:10:33.113 T:8060 INFO : load new skin... 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: trailer = get_tmdb_details(api.guids) 2021-12-21 00:10:33.113 T:8060 INFO : Loading custom window XMLs from skin path C:\Program Files (x86)\Kodi\addons\skin.estuary\xml 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata_tmdb.py", line 41, in get_tmdb_details 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: details = get_tmdb_scraper(settings).get_details(unique_ids) 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata_tmdb.py", line 32, in get_tmdb_scraper 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: searchlanguage = settings.getSettingString('searchlanguage') 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: TypeError: Invalid setting type 2021-12-21 00:10:33.113 T:8072 ERROR : PLEX.utils: ____

Any ideas on what I need to do to correct this error? I tried resetting PKC from the configuration, but still get the same error message.

Thanks!

KYThrill commented 2 years ago

FYI. I should have mentions I am on Kodi 19.0.0.

If I roll PKC back to 3.0.15, the error goes away on these devices. I can also update to 3.1, 3.2, 3.3, 3.4, 3.5, 3.5.2, and 3.5.3 without the error. On 3.5.4 and higher builds, the error appears.

croneter commented 2 years ago

Please share your entire DEBUG log file, not just excerpts

KYThrill commented 2 years ago

kodi.log

After reading through some of your issues log, I can't help but wonder if this isn't related to the fix you made for issue 1657. That issue was related to a branch tmdb.py file initializing "search_language", which you implemented a fix for in 3.5.4, which is the first version that causes me to have an error.

Which I checked my tmdb.py script and it is the correct one. It doesn't include "search_language".

But seems like an awfully big coincidence that you made a change that was released as 3.5.4 that was supposed to fix a branched tmdb.py script, and with that version and beyond, I appear to get an error on the same variable you were working around.

croneter commented 2 years ago

Hmmm, looks like you FIRST need to update the addon metadata.themoviedb.org.python. Then after that PlexKodiConnect. Does that help?

croneter commented 2 years ago

Error you got:

ERROR <general>: PLEX.utils: Error encountered:  - Invalid setting type
ERROR <general>: PLEX.utils: _____________________________________________________________
ERROR <general>: PLEX.utils:     Traceback (most recent call last):
ERROR <general>: PLEX.utils:       File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata.py", line 88, in run
ERROR <general>: PLEX.utils:         self._run()
ERROR <general>: PLEX.utils:       File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata.py", line 74, in _run
ERROR <general>: PLEX.utils:         self._loop()
ERROR <general>: PLEX.utils:       File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata.py", line 68, in _loop
ERROR <general>: PLEX.utils:         self._process_in_batches(item_getter, processor, plex_type)
ERROR <general>: PLEX.utils:       File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata.py", line 58, in _process_in_batches
ERROR <general>: PLEX.utils:         processor(plex_id, plex_type, self.refresh)
ERROR <general>: PLEX.utils:       File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata_tmdb.py", line 79, in process_trailers
ERROR <general>: PLEX.utils:         trailer = get_tmdb_details(api.guids)
ERROR <general>: PLEX.utils:       File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata_tmdb.py", line 41, in get_tmdb_details
ERROR <general>: PLEX.utils:         details = get_tmdb_scraper(settings).get_details(unique_ids)
ERROR <general>: PLEX.utils:       File "C:\Users\Will\AppData\Roaming\Kodi\addons\plugin.video.plexkodiconnect\resources\lib\library_sync\additional_metadata_tmdb.py", line 32, in get_tmdb_scraper
ERROR <general>: PLEX.utils:         search_language = settings.getSettingString('searchlanguage')
ERROR <general>: PLEX.utils:     TypeError: Invalid setting type
ERROR <general>: PLEX.utils: _____________________________________________________________
KYThrill commented 2 years ago

The metadata.themoviedb.org.python that I have matches perfectly what you said was correct in issue 1657. I DO NOT have the branch version that was causing others problems. But you added some sort of code in 3.5.4 to handle others having this branched script, including handling for "search_language" being present in the branched add on.

class TMDBMovieScraper(object): def init(self, url_settings, language, certification_country): self.url_settings = url_settings self.language = language self.certification_country = certification_country self._urls = None

I have version 1.31+matrix.1 of Movie Database Python, which is the official version in the Kodi repository for Matrix.

KYThrill commented 2 years ago

Well.. I tried something. I went to the two different Movie Database addons, Movie Database Python (Team Kodi 1.31+matrix.1) and The Movie Database (Team Kodi 5.2.6). I changed the language setting from (en or en-us) to a different language, and then changed them back.

Now I do not get the "Invalid setting type error".

However, after doing this I tried rolling the script back and got an error. Then updating it again, got an error after install. But I closed Kodi and restarted, and now seem to be able to movie forward and back in versions without errors. I didn't catch that new error in the logs to see what it was.

Unfortunately, I don't have an media to add right now to test functionality. I did a force update all content and that seemed to have worked okay.

My only guess is maybe at some point, maybe "en-us" wasn't an option and it was just "en". So some xml somewhere had the language as "en" and that got carried forward with the updates? But now "en" had been replaced with "en-US, en-GB, etc." and it wasn't recognizing that old "en" as valid?

Or someplace language just wasn't being defined?

Not sure what changed between 3.5.3 and 3.5.4 that would cause PKC to throw an error for those reasons, but it might be something to look at while I still have one device that isn't fixed.

KYThrill commented 2 years ago

Well... never mind all that... restarted again after I did the force update of all content, and the error is back again...

Same as originally. Changing language again still causes an error after changing the language settings. So for some reason, it just wasn't giving the error before when I took those steps...

KYThrill commented 2 years ago

kodi.old.log

My old log caught that other error I was seeing flash up in Kodi.

2021-12-22 12:45:15.823 T:4052 ERROR : EXCEPTION: Unknown addon id 'plugin.video.plexkodiconnect'.

So looking at the log, maybe PKC wasn't even running, and that was why I wasn't seeing the invalid data type error?

Anyway, I seem to be back at the original error now...

croneter commented 2 years ago

Make sure you have an up-to-date Kodi add-on metadata.themoviedb.org.python, yours seems awefully old with 1.31+matrix.1! Here's mine:

<addon id="metadata.themoviedb.org.python"
       name="The Movie Database Python"
       version="1.5.1+matrix.1"
       provider-name="Team Kodi">

Generally try to use up-to-date add-ons, there have been many changes to them!

croneter commented 2 years ago

This error is thrown if you just updated PKC (there's nothing I can do to fix this 😞 )

ERROR : EXCEPTION: Unknown addon id 'plugin.video.plexkodiconnect'.

Ignore it. Restart Kodi to make sure. Try again.

KYThrill commented 2 years ago

For some reason, the Kodi repository was not updating. After I forced an update of the Kodi repository, Kodi did several dependency updates, including updating to TMDB Python 1.5.1+matrix.1.

The error seems to have gone away after that. I am on 3.5.8 and not experiencing that error. I checked the NVidia Shield that was getting the same error, and it also has an old version of the repository that doesn't seem to be updating. That repository allows me to select Kodi 19.3 to install from it, but includes the older TMDB script in it.

I guess on the other four devices that had no error, the repository was updating correctly and they had the newer versions of the TMDB script.

I guess I would call it problem solved then, but perhaps this was some issue previously reported to Kodi.

Thanks!

KYThrill commented 2 years ago

On other thing I forgot to mention about the process, which makes me think maybe a bug on Kodi's part. When I forced an update on the Kodi repository, the version number of the repository did not change. It still reported as Team Kodi 3.2.5, both before and after the update. But several addons got downloaded to new versions and when I check them, different versions now show in the "Versions" info of the addon.

So it appears to be some sort of incomplete update occurring on the Kodi repository.