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

AuthClient raises UnboundLocalError in Dapla Lab #169

Closed
mmwinther opened this issue Aug 12, 2024 · 1 comment
Closed

AuthClient raises UnboundLocalError in Dapla Lab #169

mmwinther opened this issue Aug 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mmwinther
Copy link
Member

This prevents any access to files in GCS for Datadoc. It is possible that there is an underlying problem with infrastructure or configuration, but even if this is the case it should not result in an UnboundLocalError.

Calling code: https://github.com/statisticsnorway/datadoc/blob/288c41202a612c94a7e44d0e5e4a2d08eb615308/src/datadoc/backend/utils.py#L42

Traceback:

client = GSClient(credentials=AuthClient.fetch_google_credentials())
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/usr/local/lib/python3.12/site-packages/dapla/auth.py\", line 136, in fetch_google_credentials
    return credentials
         ^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'credentials' where it is not associated with a value

@mmwinther mmwinther added the bug Something isn't working label Aug 12, 2024
@RupinderKaurSSB RupinderKaurSSB self-assigned this Aug 12, 2024
@RupinderKaurSSB
Copy link
Contributor

Solved the issue in PR: #170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants