Win Video addons doesn't work, developers read please, it's your bug
#1
Hello. I have a problem with video addons on Kodi. I found the reason, but don't know how to fix the problem.
For example I try to use Youtube, however it doesn't start, just shows error (script failed). It's because in my name of Windows User i used polish diacritic letter. On the second PC i have two users and one is without non-latin letters - addons works correctly on that one.
I can show you my log. That is line made by Kodi and it's correct:
Quote:21:27:18 T:18396 NOTICE: special://masterprofile/ is mapped to: C:\Users\Przemysław\AppData\Roaming\Kodi\userdata
And here are lines made by addon:
Quote:21:27:28 T:14544 NOTICE: -->Python Interpreter Initialized<--
21:27:28 T:14544 NOTICE: [plugin.video.youtube] Starting Kodion framework by bromix...
21:27:28 T:14544 NOTICE: [plugin.video.youtube] Python : 2.7.8
21:27:28 T:14544 NOTICE: [plugin.video.youtube] System : Helix (2.19)
21:27:28 T:14544 NOTICE: [plugin.video.youtube] Context: YouTube (5.0.5)
21:27:28 T:14544 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeDecodeError'>
Error Contents: 'ascii' codec can't decode byte 0xc5 in position 14: ordinal not in range(128)
Traceback (most recent call last):
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\default.py", line 7, in <module>
runner.run(__provider__)
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\runner.py", line 28, in run
__RUNNER__.run(provider, context)
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\impl\xbmc\xbmc_runner.py", line 23, in run
results = provider.navigate(context)
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\abstract_provider.py", line 123, in navigate
result = method(context, re_match)
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\abstract_provider.py", line 186, in _internal_root
return self.on_root(context, re_match)
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\youtube\provider.py", line 388, in on_root
self.get_client(context)
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\youtube\provider.py", line 92, in get_client
context.get_function_cache().clear()
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\impl\abstract_context.py", line 47, in get_function_cache
self._function_cache = FunctionCache(os.path.join(self._get_cache_path(), u'cache'),
File "C:\Users\Przemys�aw\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\impl\abstract_context.py", line 40, in _get_cache_path
self._cache_path = os.path.join(self.get_data_path(), u'kodion')
File "C:\Program Files (x86)\Kodi\system\python\Lib\ntpath.py", line 84, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 14: ordinal not in range(128)
-->End of Python script error report<--
21:27:28 T:18396 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.youtube/
21:27:28 T:18396 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/) failed
Do you have any ideas how to fix it without making new account in my OS? I believe you can have other suggestions. I've never had similar problem.
Reply
#2
I would guess that the best way to deal with this is to use path substitution in advancedsettings.xml
Reply
#3
Thanks for your answer.
How should I use it?
I tried:
Quote:<pathsubstitution>
<substitute>
<from>C:\Users\Przemysław\AppData\Roaming\Kodi\</from>
<to>C:/Users/Przemys�aw/AppData/Roaming/Kodi/</to> <!-- Note the difference between the usage of forward and backslashes -->
</substitute>
</pathsubstitution>
and
Quote:<pathsubstitution>
<substitute>
<from>C:\Users\Przemys�aw\AppData\Roaming\Kodi\</from>
<to>C:/Users/Przemysław/AppData/Roaming/Kodi/</to> <!-- Note the difference between the usage of forward and backslashes -->
</substitute>
</pathsubstitution>
but that doesn't work.
Reply
#4
Just a quick workaround:
- move/copy your Kodi-folder from %programfiles% (or %programfiles(x86)%) directly to your drive C:\
- create a new folder named 'portable_data' inside your new Kodi-location
- move/copy all content from your user's %appdata%\Kodi to C:\Kodi\portable_data (I'd copy at first and test, though)
- start Kodi.exe with the portable switch -p

Hope this works for you... Big Grin
Bye,
Fry
Kodi v17.6 with shared MariaDB v10.3 | HTS Tvheadend 4.2.6 on RPi2 | running on:
Windows 10x64 | Nvidia Shield | FireTV4k | FireTVStick4 | Android 5 | RPi3 with OSMC
Reply
#5
Ok, thanks, it's working Wink
Now, I will know not to use non-latin letters in Windows usernames.
However if anyone have ideas how to solve it without using portable edition I'm still interested.
Reply
#6
it's a common bug in the youtube addon (and several other addons as well)
the only proper solution is to report this error in the support thread of each affected addon.
for youtube: 200735 (thread)

the fix (for addon devs) is explained in this post:
144677 (thread)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
Video addons doesn't work, developers read please, it's your bug1