Kodi Community Forum

Full Version: No module named 'configparser'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am installing kodi (latest version 19.3) on Windows machine and when installing e.g. the AddOn WatchedList, I get the following error in the log:
No module named 'configparser'

Any clue what I am missing? I have it installed on quite a few other machines and those do not have this problem.

2022-02-26 22:31:32.419 T:25220   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'ModuleNotFoundError'>
                                                   Error Contents: No module named 'configparser'
                                                   Traceback (most recent call last):
                                                     File "C:\Users\bert\AppData\Roaming\Kodi\addons\service.watchedlist\manual.py", line 10, in <module>
                                                       from lib.watchedlist.watchedlist import WatchedList
                                                     File "C:\Users\bert\AppData\Roaming\Kodi\addons\service.watchedlist\lib\watchedlist\watchedlist.py", line 52, in <module>
                                                       import mysql.connector
                                                     File "C:\Users\bert\AppData\Roaming\Kodi\addons\script.module.myconnpy\lib\mysql\connector\__init__.py", line 42, in <module>
                                                       from .connection import MySQLConnection
                                                     File "C:\Users\bert\AppData\Roaming\Kodi\addons\script.module.myconnpy\lib\mysql\connector\connection.py", line 47, in <module>
                                                       from .cursor import (
                                                     File "C:\Users\bert\AppData\Roaming\Kodi\addons\script.module.myconnpy\lib\mysql\connector\cursor.py", line 37, in <module>
                                                       from .abstracts import MySQLCursorAbstract, NAMED_TUPLE_CACHE
                                                     File "C:\Users\bert\AppData\Roaming\Kodi\addons\script.module.myconnpy\lib\mysql\connector\abstracts.py", line 40, in <module>
                                                       from .optionfiles import MySQLOptionsParser
                                                     File "C:\Users\bert\AppData\Roaming\Kodi\addons\script.module.myconnpy\lib\mysql\connector\optionfiles.py", line 44, in <module>
                                                       from configparser import (ConfigParser as SafeConfigParser,
                                                   ModuleNotFoundError: No module named 'configparser'
                                                   -->End of Python script error report<--
(2022-02-26, 23:44)piscator74 Wrote: [ -> ]Any clue what I am missing?

Log files are best provided in full for troubleshooting, and via pastebin.
you should have a file
in your Kodi program folder.  I can't think of any way Kodi does not set the PYTHONPATH properly, but without a full log can't tell anything more.

scott s.
Log to the pastebin: https://pastebin.com/EkUnLiwD

I did the following:
  1. Cleared out the entire kodi userdata folder
  2. Installed the AddOn (WatchedList)
  3. I get the missing configParser error.
I just reinstalled Kodi (same version) and now it works... Huh

The first time I installed it through a package installer (chocolatey on Windows), but I don't think that is the cause of the problem.
Could local Python installs cause a conflict? (if they are installed after kodi).
You didn't enable debug level logging in the log you posted, so it's missing some stuff.  I have to take a look at service addons, but I'm pretty sure sys.path, where the addon looks for modules, is completely determined by the PYTHONPATH that Kodi passes to it when it starts.  All the standard python library should be in the Kodi folder (on Windows at least).

scott s.