Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

UnboundLocalError when target Resource query for Recommender fails #8

Open
nickselpa opened this issue Apr 8, 2021 · 0 comments
Open

Comments

@nickselpa
Copy link

The following action(s) were taken prior to execution:

  • Refreshed local ADC for the appropriate GCP org execution context
  • Set up the virtual environment as listed in the repo's README.md

The following error with trace was encountered (sensitive information redacted from output)

403 Recommender API has not been used in project PROJECTNUMBER before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/recommender.googleapis.com/overview?project=PROJECTNUMBER then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Traceback (most recent call last):
  File "/REPOROOT/saUnused.py", line 86, in <module>
    main()
  File "/REPOROOT/saUnused.py", line 19, in main
    get_sa_insights(project_numbers)
  File "/REPOROOT/saUnused.py", line 35, in get_sa_insights
    for insight in sa_insights:
UnboundLocalError: local variable 'sa_insights' referenced before assignment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant