Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create policy tags #28

Open
marktomlinson1 opened this issue Jun 21, 2023 · 2 comments
Open

Unable to create policy tags #28

marktomlinson1 opened this issue Jun 21, 2023 · 2 comments
Assignees

Comments

@marktomlinson1
Copy link
Collaborator

When running the following from Cloud Shell in the /tagging/policy_tags folder

python create_policy_tag_taxonomy.py taxonomy.yaml

I see

Traceback (most recent call last):
File "/home/admin_/cdmc/tagging/policy_tags/create_policy_tag_taxonomy.py", line 21, in
from google.cloud.bigquery import datapolicies
ImportError: cannot import name 'datapolicies' from 'google.cloud.bigquery' (/usr/local/lib/python3.9/dist-packages/google/cloud/bigquery/init.py)

Have updated all runtimes and libraries to latest versions and ran pip install -r requirements.txt

@marktomlinson1
Copy link
Collaborator Author

Also worth noting there were no instructions to rename taxonomy.yaml.example to taxonomy.yaml and what neeeded changing

@swainjo swainjo self-assigned this Jul 20, 2023
@adityaPawarDT2
Copy link
Contributor

to fix the issue with command python create_policy_tag_taxonomy.py taxonomy.yaml

I updated below line
from google.cloud.bigquery import datapolicies
to this
from google.cloud import bigquery_datapolicies

and all occurrences of datapolicies with bigquery_datapolicies in create_policy_tag_taxonomy.py file

@swainjo swainjo added this to the Stable functional release. milestone Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants