Unmarshalling Error: For input string -- for CampaignId

1,223 views
Skip to first unread message

Jack Roth

unread,
May 21, 2013, 2:13:56 PM5/21/13
to adwor...@googlegroups.com
Hi

In my program, i'm creating a campagin (successfully).
     xxx = [{ 'operator': 'ADD',    'operand': { 'campaignId': self.campaign_id, ...

and later try to create an adgroup:
     yyy = [{ 'operator': 'ADD',  
              'operand': {  'campaignId': self.params['campaign_id'],
                                  'name': 'AdGroup: %s #%s' % (adgroup, Utils.GetUniqueName()),
     ...
     ad_groups = ad_group_service.Mutate(operations)[0]


self.campaign_id is always
here's "yyy" contents:
[{'operator': 'ADD', 'operand': {'status': 'ENABLED', 'bids': {'keywordMaxCpc': {'amount': {'microAmount': '30000'}}, 'xsi_type': 'ManualCPCAdGroupBids'}, 'name': 'AdGroup: group #1111111111', 'campaignId': u'xxxx 4432644030202152013'}}]
(the numbers are being generated on the fly by "urils.GetUniqueName")

this is the error i'm getting in line "ad_group_service.Mutate":

    AdWordsApiError: Unmarshalling Error: For input string: "itttt 4432644030202152013",


What could be the reason?
How to debug it?


Kevin Winter (AdWords API Team)

unread,
May 23, 2013, 10:25:13 AM5/23/13
to adwor...@googlegroups.com
Hi Jack,
  The CampaignId must be numerical.  In your ad group structure:

[{'operator': 'ADD', 'operand': {'status': 'ENABLED', 'bids': {'keywordMaxCpc': {'amount': {'microAmount': '30000'}}, 'xsi_type': 'ManualCPCAdGroupBids'}, 'name': 'AdGroup: group #1111111111', 'campaignId': u'xxxx 4432644030202152013'}}]

It appears that campaignId is not solely numerical.  I'd track back and try logging the contents of that field at various points in your code to discover where it gets changed.

- Kevin Winter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages