Skip to content

cdm_path = translate_path(to_unicode(addon.getSetting('DECRYPTERPATH'))) in widevine.py leads to empty path and error #585

@BarkVeryLittle

Description

@BarkVeryLittle

Hi

I am running LibreElec 12.0.1. on a Raspberry Pi 4. When trying to install widevine via inputstreamhelper I got the following error and widevine was not installed:

2024-12-27 23:50:45.495 T:1706  warning <general>: [script.module.inputstreamhelper] Recursively create directory ''.
2024-12-27 23:50:45.497 T:1706     info <general>: Skipped 1 duplicate messages..
2024-12-27 23:50:45.497 T:1706    error <general>: [script.module.inputstreamhelper] Widevine CDM is not installed.
2024-12-27 23:50:45.499 T:1706  warning <general>: [script.module.inputstreamhelper] Recursively create directory ''.
2024-12-27 23:50:45.510 T:1706    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'FileNotFoundError'>
Error Contents: [Errno 2] No such file or directory: ''
Traceback (most recent call last):
File "/storage/.kodi/addons/script.module.inputstreamhelper/default.py", line 8, in <module>run(sys.argv)
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/api.py", line 15, in run widevine_install(choose_version=params[2])
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/api.py", line 48, in widevine_install Helper('mpd', drm='widevine').install_widevine(choose_version=choose_version)
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/__init__.py", line 38, in clean_before_after self.cleanup()
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/__init__.py", line 388, in cleanup
File "/storage/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/utils.py", line 360, in remove_tree rmtree(compat_path(path))
File "/usr/lib/python3.11/shutil.py", line 742, in rmtree
File "/usr/lib/python3.11/shutil.py", line 740, in rmtree
FileNotFoundError: [Errno 2] No such file or directory: ''
-->End of Python script error report<--

I figured out that replacing
cdm_path = `translate_path(to_unicode(addon.getSetting('DECRYPTERPATH')))
in line 120 in widevine.py with
cdm_path = translate_path(os.path.join('special://home/', 'cdm'))

resolved the issue.

Prior to this I already copied <setting id="DECRYPTERPATH" default="true">special://storage/.kodi/cdm/</setting> from .kodi/userdata/addon_data/inputstream.adaptive/settings.xml to .kodi/userdata/addon_data/script.module.inputstreamhelper/settings.xml yet that didn't help.

To be honest I don't know, if my solution is ideal (yet the DAZN plug I initially tried to get to work still doesn't work), but since I did not find anything about this, I though I might share this. Maybe it helps anybody or you get any insights from this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions