Error in python script for mappdatabaseconnector - pkg_resources is missing

Hello Experts,
I am testing MappServices(5.24.3) > mpdatabasecore functionality in AS 4.12.
I have below installations:
MySql 8.0.14
Python 3.13.1
Mysql-connecotor - 9.2.0
Script: MappDatabaseConnector - 5.12.0

I am getting below error in Python script during testing:

Is there something i am missing ?

Hi!

The main issue here seems to be that the python installation is missing the pkg_resources. You should be able to install these using pip install setuptools (PyPi).
That should resolve your connection issues (or at least this specific problem/exception).

Please note that the first exception in this case is kind of misleading… That one happens as part of the connection process (in other words the KeyError exception is happening when you try to connect and is “kind-of” expected).

Please let us know if installing the setuptools solved your problem!

1 Like

Thanks @michael.stockhammer for the suggestion. I am now able to connect to the database. But there is one deprecation warning as shown below.

Unfortunately there is no updated script available (yet), but you should be able to ignore this warning (I cannot find any information that this library will be deleted anytime soon).

Either way, this warning does not influence the behaviour of the script (or MpDatabase) as long as this package is available for download. It pretty much just states that there would be “more modern” packages doing the same tasks…

PS: I do agree that seeing a warning is not nice (and should be fixed) :wink:

Thanks for your time! No issue.