examples/planning/generate_historical_metrics.py AttributeError: Assignment not allowed to map, or repeated field "keywords" in protocol message object
izidigital opened this issue · 1 comments
izidigital commented
Describe the bug:
python examples/planning/generate_historical_metrics.py -c customer_id
Traceback (most recent call last):
File "/home/xxx/Code/google-ads-python/examples/planning/generate_historical_metrics.py", line 133, in <module>
main(googleads_client, args.customer_id)
File "/home/xxx/Code/google-ads-python/examples/planning/generate_historical_metrics.py", line 36, in main
generate_historical_metrics(client, customer_id)
File "/home/xxx/Code/google-ads-python/examples/planning/generate_historical_metrics.py", line 50, in generate_historical_metrics
request.keywords = ["mars cruise", "cheap cruise", "jupiter cruise"]
AttributeError: Assignment not allowed to map, or repeated field "keywords" in protocol message object.
Steps to Reproduce:
- clone the main trunk of github repository
- add google-ads.yaml.
developer_token: xxxxxxxxxxxxxxxxx
use_proto_plus: False
json_key_file_path: xxxxxxxx.json
impersonated_email: xxx-127@xxxxxxxxxxxx.iam.gserviceaccount.com
- add the google cloud service account .json file
- run the test
python examples/planning/generate_historical_metrics.py -c customer_id
Expected behavior:
Client library version and API version:
Client library version:
Google Ads API version:
Request/Response Logs:
Anything else we should know about your project / environment:
BenRKarl commented
@izidigital you'll need to set use_proto_plus
to True
. See these docs for more info.