Kodi Community Forum
No module named 'configparser' - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: No module named 'configparser' (/showthread.php?tid=367228)



No module named 'configparser' - piscator74 - 2022-02-26

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.


Code:
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<--



RE: No module named 'configparser' - Klojum - 2022-02-26

(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.


RE: No module named 'configparser' - scott967 - 2022-02-27

you should have a file
Code:
\system\Python\Lib\configparser.py
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.
.


RE: No module named 'configparser' - piscator74 - 2022-02-27

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.



RE: No module named 'configparser' - piscator74 - 2022-02-27

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).


RE: No module named 'configparser' - scott967 - 2022-02-28

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.
.