Comments (17)
We're looking into this issue.
Seems like version of google-auth
that you're using does not expose universe_domain
as a property of credentials (This is expected).
@brianliefinaccel for now, can you please try upgrading the google-auth version to v2.23.0. Let us know if that resolves the issue for you!
from google-cloud-python.
@ohmayr and @brianliefinaccel,
Thank you for providing the solution. After upgrading google-auth
, the issue related to universe_domain
has been resolved.
pip install --upgrade google-auth
dbutils.library.restartPython()
from google-cloud-python.
Most probably because of release #12243
I also encountered the same issue using secret manager package
Traceback (most recent call last):
...
File "...", line 34, in ...
response = client.access_secret_version(name=values[i])
File "/opt/conda/default/lib/python3.7/site-packages/google/cloud/secretmanager_v1/services/secret_manager_service/client.py", line 1761, in access_secret_version
self._validate_universe_domain()
File "/opt/conda/default/lib/python3.7/site-packages/google/cloud/secretmanager_v1/services/secret_manager_service/client.py", line 549, in _validate_universe_domain
self.universe_domain, self.transport._credentials
File "/opt/conda/default/lib/python3.7/site-packages/google/cloud/secretmanager_v1/services/secret_manager_service/client.py", line 525, in _compare_universes
credentials_universe = credentials.universe_domain
AttributeError: 'Credentials' object has no attribute 'universe_domain'
from google-cloud-python.
I can confirm upgrading to google-auth
version 2.23.0 works @ohmayr
previously our google-auth
version is stuck on v1.35 because we added google-cloud-bigquery==2.20.0
into our dependency, but installing latest version of google-cloud-secret-manager
does not upgrade the google-auth
package.
I think it is already addressed in googleapis/gapic-generator-python#1922
from google-cloud-python.
@ohmayr we ended up locking our package versions to version before yesterday's release because urgency, which works to fix the issue. For google-auth
I'll see if we can deploy the upgrade for the other half of our code and report back here.
from google-cloud-python.
Hi @chaserracerr,
Regrettably, I don't have access to the discussions that you shared in Workplace. Only public information about the code or issues in Github should be shared in this thread. Here is some context about the issue in this thread:
The issue reported in this bug only occurs with older versions of google-auth
(v2.22.0 or older from July 2023). The root cause is that the minimum version of google-auth
was not stated for python client libraries, which is why this issue slipped through our testing. A workaround was provided about 30 minutes after the issue opened suggesting to use a newer version of google-auth
, which is version v2.23.0 or newer. I can confirm that the testing gap has been addressed and a fix was released yesterday via #12258.
from google-cloud-python.
I've faced the same issue. But the project was in Colab. I fixed it with
!pip install google-analytics-data==0.18.3
New version was released on February, 1, 2024 (google-analytics-data 0.18.4) and that one has errors yet.
from google-cloud-python.
Looks like this is also a problem in google-cloud-kms lib, where google-auth is not claimed to be a dependency https://github.com/googleapis/google-cloud-python/blob/6dd0a9a4f0ec8de49630b1caa1a57b45df33f376/packages/google-cloud-kms/setup.py#L42C6-L45, while it should have been because it is directly used https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-kms/google/cloud/kms_v1/services/key_management_service/client.py#L37-L40.
google-cloud-kms relies on google-api-core to introducing google-auth as a transitive dependency but https://github.com/googleapis/python-api-core/blob/5922f2b8f382ee1fd9b69fafb2eed39db93b60fb/setup.py#L34 is not good enough for google-cloud-kms because it may install a previous version of google-auth.
from google-cloud-python.
I have been also seeing the same issue when trying to run the resource manager sample code to get the project iam policy.
I upgraded the google-auth
to latest (2.27.0
). Now I get:
google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument.
from google-cloud-python.
We're looking into this issue.
Seems like version of
google-auth
that you're using does not exposeuniverse_domain
as a property of credentials (This is expected).@brianliefinaccel for now, can you please try upgrading the google-auth version to v2.23.0. Let us know if that resolves the issue for you!
On GCP Colab Enterprise here, and !pip install --upgrade google-auth
solves it, thank you
from google-cloud-python.
FYI - I have got my example working now. It appears I was defining one of the resources incorrectly!
So upgrading google-auth
also worked for me
from google-cloud-python.
I'm using google-cloud-secret-manager==2.16.4 google-auth==2.23.0/2.27.0, however im still facing below error
SecretManagerServiceClient._compare_universes(
File "/opt/conda/default/lib/python3.8/site-packages/google/cloud/secretmanager_v1/services/secret_manager_service/client.py", line 525, in _compare_universes
credentials_universe = credentials.universe_domain
AttributeError: 'Credentials' object has no attribute 'universe_domain'
from google-cloud-python.
dbutils.library.restartPython()
@ohmayr and @brianliefinaccel,
Thank you for providing the solution. After upgrading
google-auth
, the issue related touniverse_domain
has been resolved.
pip install --upgrade google-auth
dbutils.library.restartPython()
In Colab, I restarted the kernel and ran the upgrade, and everything worked fine.
from google-cloud-python.
@parthea following up on this - can you confirm this was a Google related issue that required support from Google, or was this purely within our universe that required changes. Want to ensure we got the right amount of support from Google (if needed) - thanks
This is in response to Rajpreet's comment in Workplace
from google-cloud-python.
Understood, thank you @parthea - for the Google side, is that documentation could have been improved, am I correct in saying so?
from google-cloud-python.
Correct. We're working on building automation to avoid a repeat of the issue where a dependency is used but the minimum version for the dependency is not stated: googleapis/gapic-generator-python#1924
from google-cloud-python.
I've raised the question with Google to ensure the documentation is update here (in #google-external)
from google-cloud-python.
Related Issues (20)
- [WebRisk Api] search_hashes() always returns a empty list of threat hashes HOT 2
- A module not found error in a python-selenium project HOT 2
- Update post processing customizations for grafeas HOT 1
- SecretManagerServiceClient: missing staticmethod decorators on two methods HOT 1
- Datacatalog SearchCatalogRequest fails when returning more than one page when using a policytag query HOT 1
- Can't use run_v2 from google-cloud-run
- Github Action docs build fails with `Could not install packages due to an OSError: [Errno 28] No space left on device`
- Cloud Functions: test_iam_permissions returns 501 HOT 6
- google-cloud-monitoring tests depend on mock library which causes packaging problems on Fedora
- How to create documents with the discovery engine? HOT 2
- `prerelease_deps` nox session fails for google-cloud-gke-hub HOT 1
- Docs build is failing due to known issues in proto comments HOT 1
- Value Error for speech_v2: RecognitionConfig has no field as language_codes HOT 1
- Missing summaryWithMetadata google-cloud-discoveryengine HOT 2
- Warning: a recent release failed HOT 1
- Cyclical bug report guidance on secrets-manager client
- secret-manager client 2.18 incompatible with google-auth 2.24 HOT 4
- 504 Deadline Exceeded: BigQuery to Firestore Collection using Python in Batch Writes Mode
- AttributeError: 'ClientInfo' object has no attribute 'to_grpc_metadata'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-cloud-python.