26 Dec 2025 04:40 AM - edited 26 Dec 2025 04:42 AM
Hello,
I am using Dynatrace Python Extension SDK to create a custom extension ingesting data from a SQL server, by using pyodbc Python library. For this I have the configuration:
I added in the ./setup.py file the pyodbc:
install_requires=["dt-extensions-sdk", "requests", "pyodbc==5.2.0"],
Built successfully the extension distribution package using:
dt-sdk build
and uploaded it to the tenant.
I set a monitoring configuration, and running it I am getting the exception:
"Failed to assign monitoring configuration to ActiveGate. Reason:" -- no reason mentioned.
I checked the log file python3.log in ActiveGates, related to this extension and it looks like
[err] import pyodbc
[err]ModuleNotFoundError: No module named 'pyodbc'
[err]Traceback (most recent call last):
[err] File "/opt/dynatrace/remotepluginmodule/agent/res/dsruntime/python3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
[err] return _run_code(code, main_globals, None,
[err] File "/opt/dynatrace/remotepluginmodule/agent/res/dsruntime/python3.10/lib/python3.10/runpy.py", line 86, in _run_code
[err] exec(code, run_globals)
. . . . . . . . .
I checked whether the pyodbc was installed as supposed to be in the Python runtime environment
$ cd /opt/dynatrace/remotepluginmodule/agent/res/dsruntime/python3.10/bin
$ pip show pyodbc
but nothing came up.
Not sure why the pyodbc library did not get installed in the the Python runtime environment.
Please let me know if you have any suggestions.
Thank you,
Chris
26 Dec 2025 09:50 AM
It seems OK. Please check in extension.zip if the pyodbc wheel is included?
Featured Posts