googleads/google-ads-python

example/remarketing/add_customer_match_user_list.py is not working

leandrosandmann opened this issue · 1 comments

❰leandrosandmann❙~❱✔≻ git clone https://github.com/googleads/google-ads-python.git
Cloning into 'google-ads-python'...
remote: Enumerating objects: 38420, done.
remote: Counting objects: 100% (38420/38420), done.
remote: Compressing objects: 100% (5951/5951), done.
remote: Total 38420 (delta 32852), reused 37938 (delta 32450), pack-reused 0
Receiving objects: 100% (38420/38420), 16.14 MiB | 10.41 MiB/s, done.
Resolving deltas: 100% (32852/32852), done.

❰leandrosandmann❙~❱✔≻ python google-ads-python/examples/remarketing/add_customer_match_user_list.py 
Traceback (most recent call last):
  File "/Users/leandrosandmann/google-ads-python/examples/remarketing/add_customer_match_user_list.py", line 584, in <module>
    choices=[e.name for e in googleads_client.enums.ConsentStatusEnum],
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'ConsentStatusEnum' object is not iterable

❰leandrosandmann❙~❱✘≻ python --version
Python 3.11.6

❰leandrosandmann❙~❱✔≻ pip freeze | grep google-ads
google-ads==22.1.0

To run the examples as-is, you'll need to set use_proto_plus to True, otherwise you will run into syntax errors like this. For more details on the differences between proto-plus messages and normal protobuf messages see this guide