Kodi Community Forum
Error reporting not sure where this belongs? - 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: Error reporting not sure where this belongs? (/showthread.php?tid=328062)



Error reporting not sure where this belongs? - smitchell6879 - 2018-02-04

06:46:18.996 T:9720   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: 'xbmcgui.Dialog' object is not callable
                                            -->End of Python script error report<--
06:46:18.996 T:9720   ERROR: Traceback (most recent call last):

I am seeing Roman kodi.six addon.... does this mean just to use the basic kodi core modules I will need his addon?


RE: Error reporting not sure where this belongs? - Roman_V_M - 2018-02-04

"There are no psychics" © "The Mentalist". Please read @ronie 's pinned topic about how to report a problem. As for kodi-six, using it is not mandatory, but if you are writing a 2/3 compatible addon it will save you from the pain of using ad hoc type checking and conditions that are hard to maintain.


RE: Error reporting not sure where this belongs? - cronywalls - 2019-02-04

This error statement TypeError: 'module' object is not callable is raised as you are being confused about the Class name and Module name. The problem is in the import line . You are importing a module, not a class. This happend because the module name and class name have the same name .

If you have a class "MyClass" in a file called "MyClass.py" , then you should import :
 
Code:
from MyClass import MyClass

In Python , a script is a module, whose name is determined by the filename . So when you start out your file MyClass.py with import MyClass you are creating a loop in the module structure.