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

Extension V2 Python dependencies ModuleNotFoundError: No module named

AurelienGravier
DynaMight Pro
DynaMight Pro

Hello,

 

I'm developing an V2 python extension which works like a charm locally.
But when I build and upload it the 

AurelienGravier_0-1711620743563.png

And I can found the following exception on python.exe_fastcheck/log :

[err] File "C:\ProgramData\dynatrace\remotepluginmodule\agent\runtime\extensions\python_venvs\custom_reviews_0.0.9\lib\site-packages\reviews\__main__.py", line 1, in <module>
[err] from google_play_scraper import app, Sort, reviews_all
[err]ModuleNotFoundError: No module named 'google_play_scraper'

On vscode how to add the dependency to take it in charge during the building of the extension ?

Thank you, regards.

 

Observability consultant - Dynatrace Associate/Pro/Services certified
2 REPLIES 2

Mike_L
Dynatrace Guru
Dynatrace Guru

Inside the setup.py file in the folder of the extension, add the dependencies to the install_requires line, such as this:

install_requires=["dynatrace_extension", "requests"],

 

Mike

AurelienGravier
DynaMight Pro
DynaMight Pro

Thank you @Mike_L ,

You help me to solve my issue !

First of all, as you mentioned, I have edited the "setup.py" file to add my dependency as a new "install_requires".
But it was also mandatory in my case to update the version number : 

AurelienGravier_0-1711657390206.png

git hub link :

https://dynatrace-extensions.github.io/dt-extensions-python-sdk/guides/extension_structure.html?_gl=...

Bumping version :

When bumping the version of the extension in the extension.yaml, the setup.py file must be updated as well. The two versions must match.

 

 

Thank you so much.
Best regards, Aurélien.

Observability consultant - Dynatrace Associate/Pro/Services certified

Featured Posts