GeezerVison is showing github.com — AttributeError: 'ClientOptions' object has no attribute 'api_audience'; `google-cloud-core==2.2.3` is incompatible with `google-api-core==2.8.2` · Issue #208 · googleapis/python-cloud-core
This repository was archived by the owner on Feb 13, 2026. It is now read-only.
This repository was archived by the owner on Feb 13, 2026. It is now read-only.
AttributeError: 'ClientOptions' object has no attribute 'api_audience'; google-cloud-core==2.2.3 is incompatible with google-api-core==2.8.2 #208Labels priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. DescriptionIt ;looks like google-cloud-core==2.2.3 is incompatible with google-api-core==2.8.2
AttributeError: 'ClientOptions' object has no attribute 'api_audience'
google-cloud-core==2.3.0 seems to be compatible.
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please be sure to include as much information as possible:
Environment details
- OS type and version:
- Python version: 3.7
- pip version:
pip --version
google-cloud-core version: 2.2.3
Steps to reproduce
- ?
- ?
Code example
Stack trace
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks! Activityvam-google commented on Jul 28, 2022 @atulep Can you please take a look? Looks like this change made it incompatible: googleapis/python-api-core#379
On the other hand, given our development workflow, since 2.3.0 works with latest version of google-api-core we would just recommend using that version or newer.
Also, can you please provide full stack trace on where exactly api_audience is being used in older version of google-cloud-core? Checking the diff of 2.2.3 and 2.3.0 (v2.2.3...v2.3.0) I can't spot a relevant difference. added type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p3Desirable enhancement or fix. May not be included in next release. on Jul 28, 2022Ark-kun commented on Jul 29, 2022 I lost the stack trace initially.
But now I've managed to recover it and I see that this issue is in another library - google-cloud-aiplatform
I apologize for the confusion.
/tmp/ipykernel_16859/1666459801.py in <module>
54 if __name__ == '__main__':
55 from google.cloud import aiplatform
---> 56 aiplatform.PipelineJob.from_pipeline_func(pipeline_func=pipeline_func).submit()
/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/pipeline_jobs.py in submit(self, service_account, network, create_request_timeout, experiment)
360 _LOGGER.log_create_with_lro(self.__class__)
361
--> 362 self._gca_resource = self.api_client.create_pipeline_job(
363 parent=self._parent,
364 pipeline_job=self._gca_resource,
/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/utils/__init__.py in __getattr__(self, name)
423 def __getattr__(self, name: str) -> Any:
424 """Instantiates client and returns attribute of the client."""
--> 425 return getattr(self._clients[self._default_version], name)
426
427 def select_version(self, version: str) -> VertexAiServiceClient:
/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/utils/__init__.py in __getattr__(self, name)
357 credentials=self._credentials,
358 client_options=self._client_options,
--> 359 client_info=self._client_info,
360 )
361 return getattr(temporary_client, name)
/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform_v1/services/pipeline_service/client.py in __init__(self, credentials, transport, client_options, client_info)
626 client_info=client_info,
627 always_use_jwt_access=True,
--> 628 api_audience=client_options.api_audience,
629 )
630
AttributeError: 'ClientOptions' object has no attribute 'api_audience'
The issue was introduced by googleapis/python-aiplatform#1454 and googleapis/googleapis@23f1a15 Ark-kun commented on Nov 24, 2022 Hmm. It looks like aiplatform package already states it's not compatible with 2.2.*
|
"google-api-core >= 1.31.6, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", |
MetadataMetadatapriority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. DevelopmentNo branches or pull requestsIssue actions
|