Kodi Community Forum
v19 Python Script that was working with v18 and isn't working in v19 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: v19 Python Script that was working with v18 and isn't working in v19 (/showthread.php?tid=365797)



Python Script that was working with v18 and isn't working in v19 - badsheep - 2021-12-02

Hello,

I use several home made scripts, like this one, that used to work but seems to do nothing on v19...
This is really a simple script, I'm quite sure it should work the same way on python 2 and 3.

Here's the script, VF.py
I launch it from a custom button on the home menu

--------------------------------

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import xbmc

xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"Settings.SetSettingValue", "params":{"setting":"locale.audiolanguage", "value":"French"}, "id":1}')
xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"Settings.SetSettingValue", "params":{"setting":"locale.subtitlelanguage", "value":"Azerbaijani"}, "id":1}')
xbmc.executebuiltin("Notification(VF,,4000)")

--------------------------------

Any idea ?
Thanks !


RE: Python Script that was working with v18 and isn't working in v19 - Karellen - 2021-12-02

2badsheep

Try removing the xbmc prefix


RE: Python Script that was working with v18 and isn't working in v19 - kcook_shield - 2021-12-02

possibly related to:

https://forum.kodi.tv/showthread.php?tid=343076&pid=2934411#pid2934411

(IE drop the xbmc. prefixes)?


RE: Python Script that was working with v18 and isn't working in v19 - badsheep - 2021-12-03

Hi ! Thanks to your help, I have the answer !

The "xbmc." has to stay in the scripts.

But I launched those scripts using xbmc.runscript(.../VF.py) in a custom menu button.
And that's HERE that I have to remove "xbmc." Smile

So with runscript(.../VF.py) everything is working.

Thanks !