cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Active Gate Error(No module named 'pyodbc')

brett_schubach1
Participant

Hi All,

I busy with an exceptions plugin for the ActiveGate and add in the plugin.json the installs required but doesn't seem to install the package.

"source": {
"package": "DBSQLPLUGIN",
"className": "SqlPlugin",
"install_requires": [
"requests>=2.6.0",
"SQLAlchemy==1.1.13",
"pyodbc==4.0.24"
],

"activation": "Remote"

2019-04-23 09:25:19.245 UTC [00004f10] info [native] 20240(MainThread) - [report_status] [(PluginFullStatus(pluginName=custom.remote.python.sql_plugin, pluginVersion=1.3, state=ERROR_UNKNOWN, description=No module named 'pyodbc', monitoredEntityId=0x0, stacktrace=Traceback (most recent call last):
File "C:\Program Files\dynatrace\remotepluginmodule\agent\plugin\engine.zip\ruxit\plugin_state_machine.py", line 290, in _execute_next_task
self._engine.send(None)
File "C:\Program Files\dynatrace\remotepluginmodule\agent\plugin\engine.zip\ruxit\plugin_state_machine.py", line 559, in engine_generator
plugin_module = importlib.import_module(plugin_engine_instance.metadata["source"]["package"])
File "C:/Program Files/dynatrace/remotepluginmodule/agent/plugin/python3.6\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:/Program Files/dynatrace/remotepluginmodule/plugin_deployment/SQLPlugin\DBSQLPLUGIN.py", line 1, in <module>
import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
), (527848033, 3))]


2 REPLIES 2

rodrigo_alvare1
Dynatrace Pro
Dynatrace Pro

Hello Brett,

Have you tried to perform the installation again from the scratch?

https://www.dynatrace.com/support/help/extend-dyna...

Or you could try to install the dependency with pip

Regards


brett_schubach1
Participant

Hi Rodrigo,

Thanks for the above. What I did is with pyinstalller created a distribution package and in there found pyodbc.cp36-win_amd64.pyd which I copied to the plugin folder which then worked.

Must be something wrong with the requires. As I am running this from my local laptop with python installed and the package installed it didn't seem to work but maybe its causing an issue.

Thanks again.

Regards,

Brett