Any help on this will be highly appreciated..
# general
s
Any help on this will be highly appreciated..
w
Are you using another instance of Python? This happened to me while having python 3.12 installed with homebrew. So I had to uninstall homebrew python and instead use 3.9 that comes preinstalled with MacOS. That fixed the issue with pip and installed the proper packages in the venv folder.
h
oh, i'm using pipenv to deal with environment problems
but the basic problem is that the package name is
lbrlabs-pulumi-dynatrace
s
I installed lbrlabs-pulumi-dynatrace and imported like below
import pulumi import lbrlabs_pulumi_dynatrace as dynatrace
The error I am getting from this:
# Output the HTTP monitor ID for reference pulumi.export('http_monitor_id', http_monitor.id)
Copy code
(.venv) [root@eksctl-dev-1 syntehtic_monitoring]# python3.8 a.py 
Traceback (most recent call last):
  File "a.py", line 53, in <module>
    pulumi.export('http_monitor_id', http_monitor.id)
  File "/home/Sisir.C/GIT/cleat/projects/dynatrace/syntehtic_monitoring/.venv/lib64/python3.8/site-packages/pulumi/resource.py", line 1276, in export
    raise Exception(
Exception: Failed to export output. Root resource is not an instance of 'Stack'
Below is how I am setting up the venv
Copy code
# Set up a python virtual environment
python3.8 -m venv .venv     
                            
# Activate the python virtual environment
source .venv/bin/activate
h
oh
that's...
i'm not sure how you did that, and i don't think it has to do with dynatrace
w
I would try to do a
pulumi destroy
and then a
pulumi stack rm
, and try to redeploy. To be honest, I’m not saying in any way that it’s how it’s supposed to be fixed hahahaha, but I would try at least.
We should try moving this to #python
s
I installed in my venv :
pip3.8 install lbrlabs-pulumi-dynatrace