Kodi Community Forum
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) causes exception - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: Python 3 migration (https://forum.kodi.tv/forumdisplay.php?fid=281)
+---- Thread: xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) causes exception (/showthread.php?tid=346708)



xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) causes exception - sualfred - 2019-08-28

Hey there,

I'm currently porting script.skin.helper.colorpicker to support Python3 but I getting an init exception.

Is this a Matrix Py3 build bug or do I miss a Python3 change?

Init:
https://github.com/sualfred/script.skin.helper.colorpicker/blob/master/default.py#L16

Dialog init:
https://github.com/sualfred/script.skin.helper.colorpicker/blob/master/resources/lib/ColorPicker.py#L92

Exception:
Code:

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'TypeError'>
                                            Error Contents: object.__init__() takes no arguments
                                            Traceback (most recent call last):
                                              File "C:\Users\su4lf\AppData\Roaming\Kodi\addons\script.skin.helper.colorpicker\default.py", line 65, in <module>
                                                Main()
                                              File "C:\Users\su4lf\AppData\Roaming\Kodi\addons\script.skin.helper.colorpicker\default.py", line 16, in __init__
                                                color_picker = cp.ColorPicker("script-skin_helper_service-ColorPicker.xml", ADDON_PATH, "Default", "1080i")
                                              File "C:\Users\su4lf\AppData\Roaming\Kodi\addons\script.skin.helper.colorpicker\resources\lib\ColorPicker.py", line 92, in __init__
                                                xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
                                            TypeError: object.__init__() takes no arguments
                                            -->End of Python script error report<--