Hello.
I am trying to upload offline conversion data to Google Adwords through Google API using Python
However, I am encounter error:
GoogleAdsServerFault: Unmarshalling Error: [0.02222222 5.89444444 0.42777778 ... 0.64444444 0.02222222 0.23333333]
To be more specific, here is the code and error looks like:
client = adwords.AdWordsClient.LoadFromStorage("googleads.yaml")
client.SetClientCustomerId('xxx-xxx-xxxx')
offline_conversion_feed_service = client.GetService('OfflineConversionFeedService', version='v201806')
feed = {
'conversionName': conversion_name,
'conversionTime': conversion_time,
'conversionValue': conversion_value,
'googleClickId': click_id,
}
offline_conversion_operation = {
'operator': 'ADD',
'operand': feed
}
[
To be sure, I print out the feed, and it looks like:
{'conversionName': 'LTV',
'conversionTime': array(['20180808 170353 America/New_York',
'20180808 165437 America/New_York',
'20180808 212400 America/New_York', ...,
'20180808 125331 America/New_York',
'20180808 223200 America/New_York',
'20180808 150408 America/New_York'], dtype=object),
'conversionValue': array([0.02222222, 5.89444444, 0.42777778, ..., 0.64444444, 0.02222222,
0.23333333]),
'googleClickId': array(['EAIaIQobChMI1r6w-aze3AIVy5,
'EAIaIQobChMIkLqAvKve3wE',
'EAIaIQobChMg6GCh0OyAo1EAEYASAAEgJLcPD_BwE', ...,
'EAIaIQobChMI2F6AYKEAEYAyAAEgLiYvD_BwE',
'EAIaIQobCh2MSwF0EAEYASAAEgIPmfD_BwE',
'EAIaIQobCh3nPAkbEAEYASAAEgJanPD_BwE'],
dtype=object)}
]
Then I try to upload them through:
offline_conversion_response = offline_conversion_feed_service.mutate([offline_conversion_operation])
With error message:
GoogleAdsServerFault Traceback (most recent call last)
in ()
----> 1 offline_conversion_response = offline_conversion_feed_service.mutate([offline_conversion_operation])
/Users/vzhang/Documents/Env/default/lib/python2.7/site-packages/googleads/common.pyc in MakeSoapRequest(*args)
1383 error_list = fault.errors or error_list
1384 raise googleads.errors.GoogleAdsServerFault(
-> 1385 e.detail, errors=error_list, message=e.message)
1386 return MakeSoapRequest
1387
GoogleAdsServerFault: Unmarshalling Error: [0.02222222 5.89444444 0.42777778 ... 0.64444444 0.02222222 0.23333333]
Can anyone let me know what's wrong with my code and how to fix it?
Thanks!