a4k-openproject / a4kOfficial

Apache License 2.0
21 stars 1 forks source link

[BUG] NoneType if scraping with provider enabled but not installed #4

Closed irbyjm closed 2 years ago

irbyjm commented 2 years ago

@drinfernoo

I enabled Amazon Prime without installing the add-on yet and went to scrape to make sure all of my other updates were working--this popped out.

2022-10-07 11:11:54.005 T:10756   ERROR <general>: SEREN (5): Traceback (most recent call last):
                                                     File "C:\Users\irby\AppData\Roaming\Kodi\addons\plugin.video.seren\resources\lib\common\thread_pool.py", line 52, in run
                                                       result_callback(func(*args, **kwargs))
                                                     File "C:\Users\irby\AppData\Roaming\Kodi\addons\plugin.video.seren\resources\lib\modules\getSources.py", line 548, in _get_adaptive_sources
                                                       provider_source = provider_module.sources()
                                                     File "C:\Users\irby\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.seren\providers\a4kOfficial\en\adaptive\primevideo.py", line 8, in __init__
                                                       super(sources, self).__init__(providers=["amp", "amz", "prv"])
                                                     File "C:\Users\irby\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.seren\providerModules\a4kOfficial\core\justwatch.py", line 14, in __init__
                                                       self._country = common.get_setting("justwatch.country")
                                                     File "C:\Users\irby\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.seren\providerModules\a4kOfficial\common.py", line 22, in get_setting
                                                       return provider_tools.get_setting(PACKAGE_NAME, id)
                                                     File "C:\Users\irby\AppData\Roaming\Kodi\addons\plugin.video.seren\resources\lib\common\provider_tools.py", line 17, in get_setting
                                                       return SettingsManager().get_setting(package_name, setting_id)
                                                     File "C:\Users\irby\AppData\Roaming\Kodi\addons\plugin.video.seren\resources\lib\modules\providers\settings.py", line 52, in get_setting
                                                       return self._cast_setting(setting)
                                                     File "C:\Users\irby\AppData\Roaming\Kodi\addons\plugin.video.seren\resources\lib\modules\providers\settings.py", line 43, in _cast_setting
                                                       if setting["type"] == "bool":
                                                   TypeError: 'NoneType' object is not subscriptable
drinfernoo commented 2 years ago

Ah, good call. Will catch that one.

drinfernoo commented 2 years ago

Hang on a second... I don't think that's what causes this 🤔 Will look further.

irbyjm commented 2 years ago

Yep! Package didn't install properly, reinstall resolved.