Python error
Closed this issue · 4 comments
Hi team,
This looks like a really useful project, and I am trying to run the manual scan on my laptop but I keep on getting the same python error message every time:
# Traceback (most recent call last):
File "/tmp/gcp-ns.py", line 6, in <module>
from google.cloud import resource_manager
ImportError: cannot import name 'resource_manager' from 'google.cloud' (unknown location)
Any idea on how to fix this? I have tried re-installing all the pip packages a couple of times, and in different python runtimes (3.8 on my mac, and 3.9 in a docker image)
Any guidance would be greatly appreciated!
It looks like you haven't installed google-cloud-resource-manager:
pip install google-cloud-resource-manager
If you haven't already tried, it may be worth testing using a Python virtual environment.
Please let me know how you get on.
@paulschwarzenberger The underlying google library has been changed. There is no such thing as resource_manager
anymore, but resourcemanager
and/or resourcemanagerv3
.
And unfortunately there is no more resourcemanager.Client()
, everything needs to be updated. Previously you were using a 0.x
google.cloud lib which has been massively rewritten from 1.0+
Also it would be nice to include a requirements.txt
so we could just install it as pip install -r requirements.txt
rather than figuring out the dependencies from comments.
thanks for this, I will update!
updated - see https://github.com/ovotech/domain-protect-gcp/pull/9