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

ModuleNotFoundError: No module named 'google' on AWS #892

Open
ahmed101263 opened this issue Oct 25, 2024 · 1 comment
Open

ModuleNotFoundError: No module named 'google' on AWS #892

ahmed101263 opened this issue Oct 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working triage New issue; requires attention

Comments

@ahmed101263
Copy link

Describe the bug:
When attempting to use the Google Ads API v17 with the Python google-ads client library, specifically version 24.1.0, we encountered issues during setup in the AWS Glue environment. Despite following the documented setup and dependencies, the library fails to initialize correctly with the error: ModuleNotFoundError: No module named 'google'. This error persists even with all required dependencies packaged and referenced correctly in the Glue job.

Steps to Reproduce:

Configure an AWS Glue job (Python 3.10) with google-ads==24.1.0 and associated dependencies (google-auth==2.23.4, google-auth-oauthlib==1.2.1, grpcio==1.59.0, etc.).
Add the dependencies via --extra-py-files parameter, pointing to S3 paths of .whl files.
Run the Glue job to initiate an API call using Google Ads API v17.
Observe the error in the Glue job logs.
Expected behavior: The Glue job should initialize the google-ads client and connect to Google Ads API v17 without encountering ModuleNotFoundError. The dependencies should load correctly, allowing the API request to be made successfully.

Client library version and API version:

Client library version: google-ads==24.1.0
Google Ads API version: v17

Dependencies:

google-ads==24.1.0
google-auth==2.23.4
google-auth-oauthlib==1.2.1
google-api-core==2.21.0
grpcio==1.59.0
grpcio-status==1.59.0
proto-plus==1.22.3
protobuf==4.25.0
tenacity==8.2.3
cachetools==5.3.1
pydantic==2.9.2
Request/Response Logs:

Error log:

ModuleNotFoundError: No module named 'google'

Anything else we should know about your project/environment:

The issue occurs specifically in AWS Glue environments, even when dependencies are packaged according to AWS Glue's requirements.

@ahmed101263 ahmed101263 added bug Something isn't working triage New issue; requires attention labels Oct 25, 2024
@ahmed101263 ahmed101263 changed the title ModuleNotFoundError: No module named 'google' ModuleNotFoundError: No module named 'google' on AWS Oct 25, 2024
@BenRKarl
Copy link
Contributor

@ahmed101263 was this working previously? If so which version of the google-ads-python library were you using then it did work?

@BenRKarl BenRKarl self-assigned this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issue; requires attention
Projects
None yet
Development

No branches or pull requests

2 participants