Comments (3)
@sarsivas thanks for reporting this issue.
I tried running a simple script locally with google-api-python-client==2.122.0
and google-auth==2.28.2
and did not get the same error as you.
from googleapiclient.discovery import build
def main():
build("", "")
if __name__ == '__main__':
main()
However, I found out that mtls
was added to google.auth.transport
in v1.14.0.
Therefore, a version of google-auth
<= 1.14.0
results in the error that you're experiencing.
With pip install google-auth==1.13.1
, I get the following error:
from google.auth.transport import mtls
ImportError: cannot import name 'mtls' from 'google.auth.transport' (/usr/local/google/home/omairn/.pyenv/versions/3.9.5/envs/py39/lib/python3.9/site-packages/google/auth/transport/__init__.py)
It may be that in your case, an older version of google-auth
is being installed as a transitive dependency.
Can you confirm this behaviour by running pip show google-auth
?
If that's not the case, we will need more information from you regarding what exactly you're running and if this occurs only when using the Python SDK in App engine.
from google-api-python-client.
Thank you, Ohmayr. We are utilizing the 'google/cloud-sdk:449.0.0' Docker image to execute pytest. The error pertains to the Google Cloud SDK library path where it does not contain the 'mtls.py' module.
Below is the output:
# ls /usr/lib/google-cloud-sdk/platform/google_appengine/google/auth/transport/
__init__.py _http_client.py _mtls_helper.py requests.py
Not referring to google-auth in this path.
# ls /usr/local/lib/python3.9/dist-packages/google/auth/transport/
__init__.py __pycache__ _aiohttp_requests.py _custom_tls_signer.py _http_client.py _mtls_helper.py grpc.py mtls.py requests.py urllib3.py
After adding the PYTHONPATH as below, it appears to be working
/usr/local/lib/python3.9/dist-packages:/usr/lib/google-cloud-sdk/platform/google_appengine/
Not an issue with the library, it seems that the old version of the library, which doesn't have 'mtls', is present in the Google Cloud SDK version 449. We can close this support ticket.
from google-api-python-client.
Glad you were able to resolve the issue! Closing.
from google-api-python-client.
Related Issues (20)
- Release notes should indicate when new API versions are added HOT 1
- Can we suppress Google from automatically trying to refresh on expired tokens? HOT 1
- Warning: a recent release failed HOT 1
- Update Group allowExternalMembers not updating HOT 1
- oauth2client needs to be frozen at version 3.0.0 in order to work HOT 1
- Warning: a recent release failed
- HttpMockSequence is missing close() method HOT 1
- Missing aplications for report_v1 API HOT 1
- Highlight code syntax in the readme file for better visibility
- Add tests for validating credentials for the configured universe once leveraged.
- Inconsistency in doc : OAuth for Installed Applications
- Samples are old and miss requirements.txt
- Issue with Cloud Firestore API: listDocuments method and listing all collections in a database HOT 1
- Invalid argument "eventType" for search request HOT 1
- Bug
- backupRuns().list does not generate pages correctly for large result sets
- permissions.get() doesn't return a full Permission instance HOT 2
- Payment receipt_png
- Service Account cannot edit slide
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-api-python-client.