googleads/google-ads-python

Google Ads library version 23.1.0 has a compatibility issue with AWS lambda.

dl57934 opened this issue · 1 comments

Describe the bug:
There was no problem when using version 22.1.0 of the Google Ads library, but a problem occurred in Lambda when using version 23.1.0.

error: [ERROR] Runtime.ImportModuleError: Unable to import module 'handler': protobuf Traceback (most recent call last):

I know that aws lambda import error usually occurs when the python library is implemented as a C++ library. e.g) numpy, opencv

It was not a protobuf problem in the error name. Even when using Google Ads 22.1.0, the same version (4.25.2) of protobuf was used.

We updated all dependent libraries to use the same version when using 22.1.0 and 23.1.0. So it seems like the problem is with google ads 23.1.0 and not a conflict with another library.

There are no changes in the code other than moving v15 to v16.
e.g)
from google.ads.googleads.v15.resources.types import campaign, customer -> from google.ads.googleads.v16.resources.types import campaign, customer

While upgrading to Google Ads v23.1.0, was there any additional use of libraries implemented in C++?

Steps to Reproduce:
Running in AWS lambda after upgrading to google ads 23.1.0

Expected behavior:
Runs normally.

Client library version and API version:
Client library version
python 3.8
Google Ads API version: 23.1.0
Google API Core 2.15.0
Google Auth 2.26.2
google-auth-oauthlib 1.2.0
googleapis-common-protos 1.62.0

Request/Response Logs:

Anything else we should know about your project / environment: Python Version: Python3.8, Environment: aws lambda, Architecture: x86_64

A file called google_ads-22.1.0-py3.8-nspkg.pth was created in the zip file distributed to lambda, but the .pth file was not created in the 23.1.0 version zip file.

There seems to have been a problem with the distribution part. Please check.