Re: Error while trying to add a LogicalUserList

2018-03-05 Thread 'Josh Radcliff (AdWords API Team)' via AdWords API Forum
Hi,

I'm not much of a Python expert, so please bear with me on formatting and 
style, but the following snippet worked for me:

  rule = {
  'operator': 'ALL',
  'ruleOperands': [
  {
  'UserList': {
  'xsi_type': 'BasicUserList',
  'id': *INSERT_USER_LIST_ID_A_HERE*,
  }
  },
  {
  'UserList': {
  'xsi_type': 'BasicUserList',
  'id': *INSERT_USER_LIST_ID_B_HERE*,
  }
  }
  ]
  }

  # Construct operations and add a user list.
  operations = [
  {
  'operator': 'ADD',
  'operand': {
  'xsi_type': 'LogicalUserList',
  'name': 'Logical #%s' % uuid.uuid4(),
  'description': 'Logical test',
  'rules': [rule],
  }
  }
  ]


Could you give that a try and let me know if you still encounter issues?

Thanks,
Josh, AdWords API Team

On Monday, March 5, 2018 at 9:35:01 AM UTC-5, Josh Radcliff (AdWords API 
Team) wrote:
>
> Hi,
>
> Sorry, I just realized I sent you an example for rule based user lists. 
> I'll look into this and try to provide you with some Python snippets to 
> help.
>
> In the meantime, Damien, if you have a snippet that could help, please 
> share it here.
>
> Thanks,
> Josh, AdWords API Team
>
> On Monday, March 5, 2018 at 9:00:46 AM UTC-5, Josh Radcliff (AdWords API 
> Team) wrote:
>>
>> Hi,
>>
>> Could you check out the add_rule_based_user_lists.py example 
>> 
>>  and 
>> then let me know if that doesn't clear up your question?
>>
>> Thanks,
>> Josh, AdWords API Team
>>
>> On Friday, March 2, 2018 at 7:15:13 PM UTC-5, iukhnovy...@gmail.com 
>> wrote:
>>>
>>> hi, what you exactly changed in your pythone code?
>>>
>>> W dniu poniedziałek, 20 lipca 2015 19:50:01 UTC+2 użytkownik Damien 
>>> napisał:

 Hi Josh,

 Thank you very much, this solved my problem and I've been able to 
 successfully create my LogicalUserList.

 Damien

 On Monday, July 20, 2015 at 10:24:21 AM UTC-4, Josh Radcliff (AdWords 
 API Team) wrote:
>
> Hi Damien,
>
> I think the issue here is your ruleOperands 
> .
>  
> This attribute should be a list of LogicalUserListOperand 
> s,
>  
> each of which in turn has a *child* UserList element.
>
> So instead of:
>   
> ALL
> 
>   102489659
>
> your request should look like:
>   
> ALL
> 
>   
> 102489659
> 
> Please give that a try and let me know if you run into any other 
> issues.
>
> Thanks,
> Josh, AdWords API Team
>
> On Friday, July 17, 2015 at 2:36:37 PM UTC-4, Damien wrote:
>>
>> Hi Josh,
>>
>> Here is the Python logger output, you can find the XML request below 
>> (all sensitive information replaced by "[removed]"):
>>
>> DEBUG:suds.transport.http:opening (https://
>> adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl
>> )
>> DEBUG:suds.transport.http:sending:
>> URL: https://
>> adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
>> HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 
>> 'Bearer 
>> [removed]', 'SOAPAction': b'""', 'Content-type': 'text/xml; 
>> charset=utf-8', 'Soapaction': b'""'}
>> MESSAGE:
>> b'> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/; 
>> xmlns:tns="https://adwords.google.com/api/adwords/rm/v201502; 
>> xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502; 
>> xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1="
>> https://adwords.google.com/api/adwords/rm/v201502; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance;>>  
>> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed]>  
>> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed]>  
>> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed] 
>> (AwApi-Python, googleads/3.5.0, 
>> Python/3.4.3)https://adwords.google.com/api/adwords/cm/v201502;>false>  
>> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>falseADD>  
>> xsi:type="ns1:LogicalUserList">[removed] list created at 
>> 20150717 
>> 14:18:00Users who visited list A but not B, 
>> C 
>> and 
>> DLogicalUserListALL>  
>> 

Re: Error while trying to add a LogicalUserList

2018-03-05 Thread 'Josh Radcliff (AdWords API Team)' via AdWords API Forum
Hi,

Sorry, I just realized I sent you an example for rule based user lists. 
I'll look into this and try to provide you with some Python snippets to 
help.

In the meantime, Damien, if you have a snippet that could help, please 
share it here.

Thanks,
Josh, AdWords API Team

On Monday, March 5, 2018 at 9:00:46 AM UTC-5, Josh Radcliff (AdWords API 
Team) wrote:
>
> Hi,
>
> Could you check out the add_rule_based_user_lists.py example 
> 
>  and 
> then let me know if that doesn't clear up your question?
>
> Thanks,
> Josh, AdWords API Team
>
> On Friday, March 2, 2018 at 7:15:13 PM UTC-5, iukhnovy...@gmail.com wrote:
>>
>> hi, what you exactly changed in your pythone code?
>>
>> W dniu poniedziałek, 20 lipca 2015 19:50:01 UTC+2 użytkownik Damien 
>> napisał:
>>>
>>> Hi Josh,
>>>
>>> Thank you very much, this solved my problem and I've been able to 
>>> successfully create my LogicalUserList.
>>>
>>> Damien
>>>
>>> On Monday, July 20, 2015 at 10:24:21 AM UTC-4, Josh Radcliff (AdWords 
>>> API Team) wrote:

 Hi Damien,

 I think the issue here is your ruleOperands 
 .
  
 This attribute should be a list of LogicalUserListOperand 
 s,
  
 each of which in turn has a *child* UserList element.

 So instead of:
   
 ALL
 
   102489659

 your request should look like:
   
 ALL
 
   
 102489659
 
 Please give that a try and let me know if you run into any other issues.

 Thanks,
 Josh, AdWords API Team

 On Friday, July 17, 2015 at 2:36:37 PM UTC-4, Damien wrote:
>
> Hi Josh,
>
> Here is the Python logger output, you can find the XML request below 
> (all sensitive information replaced by "[removed]"):
>
> DEBUG:suds.transport.http:opening (https://
> adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
> DEBUG:suds.transport.http:sending:
> URL: https://
> adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
> HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 
> 'Bearer 
> [removed]', 'SOAPAction': b'""', 'Content-type': 'text/xml; 
> charset=utf-8', 'Soapaction': b'""'}
> MESSAGE:
> b' xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/; xmlns:tns="
> https://adwords.google.com/api/adwords/rm/v201502; xmlns:ns2="
> https://adwords.google.com/api/adwords/cm/v201502; xmlns:ns0="
> http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1="
> https://adwords.google.com/api/adwords/rm/v201502; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance;>  
> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed]  
> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed]  
> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed] 
> (AwApi-Python, googleads/3.5.0, 
> Python/3.4.3)https://adwords.google.com/api/adwords/cm/v201502;>false  
> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>falseADD  
> xsi:type="ns1:LogicalUserList">[removed] list created at 
> 20150717 
> 14:18:00Users who visited list A but not B, C 
> and 
> DLogicalUserListALL  
> xsi:type="ns1:ExpressionRuleUserList">102489659falseList
>  
> A created at 20150717 14:17:57Users who 
> visited 
> a page where URL contains 
> [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]NONE  
> xsi:type="ns1:ExpressionRuleUserList">102489779falseList
>  
> B created at 20150717 14:17:58Users who 
> visited 
> a page where URL contains 
> [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]  
> xsi:type="ns1:ExpressionRuleUserList">102489899falseList
>  
> C created at 20150717 14:17:58Users who 
> visited 
> a page where URL contains 
> [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]  
> xsi:type="ns1:ExpressionRuleUserList">102490019falseList
>  
> D created at 20150717 14:17:59Users who 
> visited 
> a page where URL contains 
> [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]'
> ERROR:suds.client:
>
> Thank you for your help,
>
> Damien
>
> On Friday, July 17, 2015 at 9:26:44 AM UTC-4, Josh Radcliff (AdWords 
> API Team) wrote:
>>
>> Hi Damien,

Re: Error while trying to add a LogicalUserList

2018-03-05 Thread 'Josh Radcliff (AdWords API Team)' via AdWords API Forum
Hi,

Could you check out the add_rule_based_user_lists.py example 

 and 
then let me know if that doesn't clear up your question?

Thanks,
Josh, AdWords API Team

On Friday, March 2, 2018 at 7:15:13 PM UTC-5, iukhnovy...@gmail.com wrote:
>
> hi, what you exactly changed in your pythone code?
>
> W dniu poniedziałek, 20 lipca 2015 19:50:01 UTC+2 użytkownik Damien 
> napisał:
>>
>> Hi Josh,
>>
>> Thank you very much, this solved my problem and I've been able to 
>> successfully create my LogicalUserList.
>>
>> Damien
>>
>> On Monday, July 20, 2015 at 10:24:21 AM UTC-4, Josh Radcliff (AdWords API 
>> Team) wrote:
>>>
>>> Hi Damien,
>>>
>>> I think the issue here is your ruleOperands 
>>> .
>>>  
>>> This attribute should be a list of LogicalUserListOperand 
>>> s,
>>>  
>>> each of which in turn has a *child* UserList element.
>>>
>>> So instead of:
>>>   
>>> ALL
>>> 
>>>   102489659
>>>
>>> your request should look like:
>>>   
>>> ALL
>>> 
>>>   
>>> 102489659
>>> 
>>> Please give that a try and let me know if you run into any other issues.
>>>
>>> Thanks,
>>> Josh, AdWords API Team
>>>
>>> On Friday, July 17, 2015 at 2:36:37 PM UTC-4, Damien wrote:

 Hi Josh,

 Here is the Python logger output, you can find the XML request below 
 (all sensitive information replaced by "[removed]"):

 DEBUG:suds.transport.http:opening (https://
 adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
 DEBUG:suds.transport.http:sending:
 URL: https://
 adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
 HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 
 'Bearer 
 [removed]', 'SOAPAction': b'""', 'Content-type': 'text/xml; 
 charset=utf-8', 'Soapaction': b'""'}
 MESSAGE:
 b'>>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/; xmlns:tns="
 https://adwords.google.com/api/adwords/rm/v201502; xmlns:ns2="
 https://adwords.google.com/api/adwords/cm/v201502; xmlns:ns0="
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1="
 https://adwords.google.com/api/adwords/rm/v201502; xmlns:xsi="
 http://www.w3.org/2001/XMLSchema-instance;  
 xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed]>>>  
 xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed]>>>  
 xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed] 
 (AwApi-Python, googleads/3.5.0, 
 Python/3.4.3)https://adwords.google.com/api/adwords/cm/v201502;>false>>>  
 xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>falseADD>>>  
 xsi:type="ns1:LogicalUserList">[removed] list created at 
 20150717 
 14:18:00Users who visited list A but not B, C 
 and 
 DLogicalUserListALL>>>  
 xsi:type="ns1:ExpressionRuleUserList">102489659falseList
  
 A created at 20150717 14:17:57Users who 
 visited 
 a page where URL contains 
 [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]NONE>>>  
 xsi:type="ns1:ExpressionRuleUserList">102489779falseList
  
 B created at 20150717 14:17:58Users who 
 visited 
 a page where URL contains 
 [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]>>>  
 xsi:type="ns1:ExpressionRuleUserList">102489899falseList
  
 C created at 20150717 14:17:58Users who 
 visited 
 a page where URL contains 
 [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]>>>  
 xsi:type="ns1:ExpressionRuleUserList">102490019falseList
  
 D created at 20150717 14:17:59Users who 
 visited 
 a page where URL contains 
 [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]'
 ERROR:suds.client:

 Thank you for your help,

 Damien

 On Friday, July 17, 2015 at 9:26:44 AM UTC-4, Josh Radcliff (AdWords 
 API Team) wrote:
>
> Hi Damien,
>
> In the past, I've seen this error when the SOAP XML was malformed. 
> Could you post your request XML with sensitive information removed (such 
> as 
> your developer token) so I can check it?
>
> Thanks,
> Josh, AdWords API Team
>
> On Thursday, July 16, 2015 at 8:56:54 AM UTC-4, Damien wrote:
>>
>> Hi,
>>
>> I am currently working on creating Remarketing lists. I am using the 
>> Google AdWords API's Python libraries.
>>
>> I needed 

Re: Error while trying to add a LogicalUserList

2018-03-02 Thread iukhnovychv
hi, what you exactly changed in your pythone code?

W dniu poniedziałek, 20 lipca 2015 19:50:01 UTC+2 użytkownik Damien napisał:
>
> Hi Josh,
>
> Thank you very much, this solved my problem and I've been able to 
> successfully create my LogicalUserList.
>
> Damien
>
> On Monday, July 20, 2015 at 10:24:21 AM UTC-4, Josh Radcliff (AdWords API 
> Team) wrote:
>>
>> Hi Damien,
>>
>> I think the issue here is your ruleOperands 
>> .
>>  
>> This attribute should be a list of LogicalUserListOperand 
>> s,
>>  
>> each of which in turn has a *child* UserList element.
>>
>> So instead of:
>>   
>> ALL
>> 
>>   102489659
>>
>> your request should look like:
>>   
>> ALL
>> 
>>   
>> 102489659
>> 
>> Please give that a try and let me know if you run into any other issues.
>>
>> Thanks,
>> Josh, AdWords API Team
>>
>> On Friday, July 17, 2015 at 2:36:37 PM UTC-4, Damien wrote:
>>>
>>> Hi Josh,
>>>
>>> Here is the Python logger output, you can find the XML request below 
>>> (all sensitive information replaced by "[removed]"):
>>>
>>> DEBUG:suds.transport.http:opening (https://
>>> adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
>>> DEBUG:suds.transport.http:sending:
>>> URL: https://
>>> adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
>>> HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 
>>> 'Bearer 
>>> [removed]', 'SOAPAction': b'""', 'Content-type': 'text/xml; 
>>> charset=utf-8', 'Soapaction': b'""'}
>>> MESSAGE:
>>> b'>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/; xmlns:tns="
>>> https://adwords.google.com/api/adwords/rm/v201502; xmlns:ns2="
>>> https://adwords.google.com/api/adwords/cm/v201502; xmlns:ns0="
>>> http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1="
>>> https://adwords.google.com/api/adwords/rm/v201502; xmlns:xsi="
>>> http://www.w3.org/2001/XMLSchema-instance;>>>  
>>> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed]>>  
>>> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed]>>  
>>> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>[removed] 
>>> (AwApi-Python, googleads/3.5.0, 
>>> Python/3.4.3)https://adwords.google.com/api/adwords/cm/v201502;>false>>  
>>> xmlns:tns="https://adwords.google.com/api/adwords/cm/v201502;>falseADD>>  
>>> xsi:type="ns1:LogicalUserList">[removed] list created at 20150717 
>>> 14:18:00Users who visited list A but not B, C 
>>> and 
>>> DLogicalUserListALL>>  
>>> xsi:type="ns1:ExpressionRuleUserList">102489659falseList
>>>  
>>> A created at 20150717 14:17:57Users who visited 
>>> a page where URL contains 
>>> [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]NONE>>  
>>> xsi:type="ns1:ExpressionRuleUserList">102489779falseList
>>>  
>>> B created at 20150717 14:17:58Users who visited 
>>> a page where URL contains 
>>> [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]>>  
>>> xsi:type="ns1:ExpressionRuleUserList">102489899falseList
>>>  
>>> C created at 20150717 14:17:58Users who visited 
>>> a page where URL contains 
>>> [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]>>  
>>> xsi:type="ns1:ExpressionRuleUserList">102490019falseList
>>>  
>>> D created at 20150717 14:17:59Users who visited 
>>> a page where URL contains 
>>> [removed]OPENOWNEDACTIVE30RULE_BASEDExpressionRuleUserListurl__CONTAINS[removed]'
>>> ERROR:suds.client:
>>>
>>> Thank you for your help,
>>>
>>> Damien
>>>
>>> On Friday, July 17, 2015 at 9:26:44 AM UTC-4, Josh Radcliff (AdWords API 
>>> Team) wrote:

 Hi Damien,

 In the past, I've seen this error when the SOAP XML was malformed. 
 Could you post your request XML with sensitive information removed (such 
 as 
 your developer token) so I can check it?

 Thanks,
 Josh, AdWords API Team

 On Thursday, July 16, 2015 at 8:56:54 AM UTC-4, Damien wrote:
>
> Hi,
>
> I am currently working on creating Remarketing lists. I am using the 
> Google AdWords API's Python libraries.
>
> I needed to create a LogicalUserList combining two 
> ExpressionRuleUserList. This is the error I got:
> suds.WebFault: Server raised fault: 'Cannot construct an instance of 
> com.google.ads.api.services.datax.userlists.LogicalUserListOperand 
> because 
> it is abstract.  You are probably missing an @Uses annotation while 
> invoking public abstract 
> com.google.ads.api.services.datax.userlists.UserListReturnValue 
> 

Re: Error while trying to add a LogicalUserList

2015-07-20 Thread Josh Radcliff (AdWords API Team)
Hi Damien,

I think the issue here is your ruleOperands 
https://developers.google.com/adwords/api/docs/reference/v201506/AdwordsUserListService.UserListLogicalRule#ruleOperands.
 
This attribute should be a list of LogicalUserListOperand 
https://developers.google.com/adwords/api/docs/reference/v201506/AdwordsUserListService.LogicalUserListOperands,
 
each of which in turn has a *child* UserList element.

So instead of:
  ns1:rules
ns1:operatorALL/ns1:operator
ns1:ruleOperands xsi:type=ns1:ExpressionRuleUserList
  ns1:id102489659/ns1:id

your request should look like:
  ns1:rules
ns1:operatorALL/ns1:operator
ns1:ruleOperands
  UserList xsi:type=ns1:ExpressionRuleUserList
ns1:id102489659/ns1:id

Please give that a try and let me know if you run into any other issues.

Thanks,
Josh, AdWords API Team

On Friday, July 17, 2015 at 2:36:37 PM UTC-4, Damien wrote:

 Hi Josh,

 Here is the Python logger output, you can find the XML request below (all 
 sensitive information replaced by [removed]):

 DEBUG:suds.transport.http:opening (https://
 adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
 DEBUG:suds.transport.http:sending:
 URL: https://
 adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
 HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 'Bearer 
 [removed]', 'SOAPAction': b'', 'Content-type': 'text/xml; charset=utf-8'
 , 'Soapaction': b''}
 MESSAGE:
 b'?xml version=1.0 encoding=UTF-8?SOAP-ENV:Envelope 
 xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:tns=
 https://adwords.google.com/api/adwords/rm/v201502; xmlns:ns2=
 https://adwords.google.com/api/adwords/cm/v201502; xmlns:ns0=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=
 https://adwords.google.com/api/adwords/rm/v201502; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;SOAP-ENV:Headertns:RequestHeadertns:clientCustomerId
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:clientCustomerIdtns:developerToken
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:developerTokentns:userAgent
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed] 
 (AwApi-Python, googleads/3.5.0, 
 Python/3.4.3)/tns:userAgenttns:validateOnly xmlns:tns=
 https://adwords.google.com/api/adwords/cm/v201502;false/tns:validateOnlytns:partialFailure
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;false/tns:partialFailure/tns:RequestHeader/SOAP-ENV:Headerns0:Bodyns1:mutatens1:operationsns2:operatorADD/ns2:operatorns1:operand
  
 xsi:type=ns1:LogicalUserListns1:name[removed] list created at 20150717 
 14:18:00/ns1:namens1:descriptionUsers who visited list A but not B, C 
 and 
 D/ns1:descriptionns1:UserList.TypeLogicalUserList/ns1:UserList.Typens1:rulesns1:operatorALL/ns1:operatorns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489659/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 A created at 20150717 14:17:57/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 [removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperands/ns1:rulesns1:rulesns1:operatorNONE/ns1:operatorns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489779/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 B created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 [removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperandsns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489899/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 C created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 

Re: Error while trying to add a LogicalUserList

2015-07-20 Thread Damien
Hi Josh,

Thank you very much, this solved my problem and I've been able to 
successfully create my LogicalUserList.

Damien

On Monday, July 20, 2015 at 10:24:21 AM UTC-4, Josh Radcliff (AdWords API 
Team) wrote:

 Hi Damien,

 I think the issue here is your ruleOperands 
 https://developers.google.com/adwords/api/docs/reference/v201506/AdwordsUserListService.UserListLogicalRule#ruleOperands.
  
 This attribute should be a list of LogicalUserListOperand 
 https://developers.google.com/adwords/api/docs/reference/v201506/AdwordsUserListService.LogicalUserListOperands,
  
 each of which in turn has a *child* UserList element.

 So instead of:
   ns1:rules
 ns1:operatorALL/ns1:operator
 ns1:ruleOperands xsi:type=ns1:ExpressionRuleUserList
   ns1:id102489659/ns1:id

 your request should look like:
   ns1:rules
 ns1:operatorALL/ns1:operator
 ns1:ruleOperands
   UserList xsi:type=ns1:ExpressionRuleUserList
 ns1:id102489659/ns1:id
 
 Please give that a try and let me know if you run into any other issues.

 Thanks,
 Josh, AdWords API Team

 On Friday, July 17, 2015 at 2:36:37 PM UTC-4, Damien wrote:

 Hi Josh,

 Here is the Python logger output, you can find the XML request below (all 
 sensitive information replaced by [removed]):

 DEBUG:suds.transport.http:opening (https://
 adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
 DEBUG:suds.transport.http:sending:
 URL: https://
 adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
 HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 
 'Bearer 
 [removed]', 'SOAPAction': b'', 'Content-type': 'text/xml; 
 charset=utf-8', 'Soapaction': b''}
 MESSAGE:
 b'?xml version=1.0 encoding=UTF-8?SOAP-ENV:Envelope 
 xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:tns=
 https://adwords.google.com/api/adwords/rm/v201502; xmlns:ns2=
 https://adwords.google.com/api/adwords/cm/v201502; xmlns:ns0=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=
 https://adwords.google.com/api/adwords/rm/v201502; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;SOAP-ENV:Headertns:RequestHeadertns:clientCustomerId
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:clientCustomerIdtns:developerToken
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:developerTokentns:userAgent
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed] 
 (AwApi-Python, googleads/3.5.0, 
 Python/3.4.3)/tns:userAgenttns:validateOnly xmlns:tns=
 https://adwords.google.com/api/adwords/cm/v201502;false/tns:validateOnlytns:partialFailure
  
 xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;false/tns:partialFailure/tns:RequestHeader/SOAP-ENV:Headerns0:Bodyns1:mutatens1:operationsns2:operatorADD/ns2:operatorns1:operand
  
 xsi:type=ns1:LogicalUserListns1:name[removed] list created at 20150717 
 14:18:00/ns1:namens1:descriptionUsers who visited list A but not B, C 
 and 
 D/ns1:descriptionns1:UserList.TypeLogicalUserList/ns1:UserList.Typens1:rulesns1:operatorALL/ns1:operatorns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489659/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 A created at 20150717 14:17:57/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 [removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperands/ns1:rulesns1:rulesns1:operatorNONE/ns1:operatorns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489779/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 B created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 [removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperandsns1:ruleOperands
  
 xsi:type=ns1:ExpressionRuleUserListns1:id102489899/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
  
 C created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
 a page where URL contains 
 

Re: Error while trying to add a LogicalUserList

2015-07-17 Thread Josh Radcliff (AdWords API Team)
Hi Damien,

In the past, I've seen this error when the SOAP XML was malformed. Could 
you post your request XML with sensitive information removed (such as your 
developer token) so I can check it?

Thanks,
Josh, AdWords API Team

On Thursday, July 16, 2015 at 8:56:54 AM UTC-4, Damien wrote:

 Hi,

 I am currently working on creating Remarketing lists. I am using the 
 Google AdWords API's Python libraries.

 I needed to create a LogicalUserList combining two ExpressionRuleUserList. 
 This is the error I got:
 suds.WebFault: Server raised fault: 'Cannot construct an instance of 
 com.google.ads.api.services.datax.userlists.LogicalUserListOperand because 
 it is abstract.  You are probably missing an @Uses annotation while 
 invoking public abstract 
 com.google.ads.api.services.datax.userlists.UserListReturnValue 
 com.google.ads.api.services.datax.adwordsuserlist.AdwordsUserListService.mutate(java.util.List)
  
 throws com.google.ads.api.services.common.error.ApiException with params 
 [[com.google.ads.api.services.datax.adwordsuserlist.v201502.jaxbgen.UserListOperation@16687106]].'

 My source code:
 #!/usr/bin/python
 #coding=UTF-8

 from datetime import date
 from datetime import datetime
 from datetime import timedelta
 from googleads import adwords

 (...)

 def createNewList(client, list_a, list_b):
   # Initialize appropriate service.
   adwords_user_list_service = client.GetService(
   'AdwordsUserListService', version='v201502')


   rules = [
   {
   'ruleOperands': [list_a],
   'operator': 'ALL'
   },
   {
   'ruleOperands': [list_b],
   'operator': 'NONE'
   }
   ]


   # Create the user list with no restrictions on site visit date.
   combination_user_list = {
   'xsi_type': 'LogicalUserList',
   'name': 'Bouncers list created at %s'
   % datetime.today().strftime('%Y%m%d %H:%M:%S'),
   'description': 'Users who visited list A but not B',
   'rules': rules
   #'startDate': today.strftime('%Y%m%d'),
   #'endDate': end_date.strftime('%Y%m%d')
   }


   # Create operations to add the user lists.
   operations = [
   {
   'operand': user_list,
   'operator': 'ADD',
   } for user_list in [combination_user_list]
   ]


   # Submit the operations.
   user_lists = adwords_user_list_service.mutate(operations)


   # Display results.
   for user_list in user_lists['value']:
 print (('User list added with ID %d, name %s, status %s, list 
 type'
 ' %s, accountUserListStatus %s, description %s.') %
(user_list['id'], user_list['name'],
 user_list['status'], user_list['listType'],
 user_list['accountUserListStatus'], user_list['description']))



 adwords_client = adwords.AdWordsClient.LoadFromStorage()

 createNewList(adwords_client, list_a, list_b)

 With list_a and list_b being lists I previously created.

 Can anybody tell me what's wrong?

 Alternatively, how is it possible to reproduce the Visitors of a page 
 who did not visit another page behaviour with the API? The only way 
 seemed to used combination lists but even is failing (see the error 
 above)...


 Thanks for your help,

 Damien


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e3172f1a-7b61-425e-8e10-54b67065dfe6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error while trying to add a LogicalUserList

2015-07-17 Thread Damien
Hi Josh,

Here is the Python logger output, you can find the XML request below (all 
sensitive information replaced by [removed]):

DEBUG:suds.transport.http:opening (https:
//adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService?wsdl)
DEBUG:suds.transport.http:sending:
URL: https:
//adwords.google.com/api/adwords/rm/v201502/AdwordsUserListService
HEADERS: {'Content-Type': 'text/xml; charset=utf-8', 'Authorization': 'Bearer 
[removed]', 'SOAPAction': b'', 'Content-type': 'text/xml; charset=utf-8', 
'Soapaction': b''}
MESSAGE:
b'?xml version=1.0 encoding=UTF-8?SOAP-ENV:Envelope 
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:tns=https://adwords.google.com/api/adwords/rm/v201502; 
xmlns:ns2=https://adwords.google.com/api/adwords/cm/v201502; 
xmlns:ns0=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:ns1=https://adwords.google.com/api/adwords/rm/v201502; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;SOAP-ENV:Headertns:RequestHeadertns:clientCustomerId
 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:clientCustomerIdtns:developerToken
 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed]/tns:developerTokentns:userAgent
 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;[removed] 
(AwApi-Python, googleads/3.5.0, 
Python/3.4.3)/tns:userAgenttns:validateOnly 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;false/tns:validateOnlytns:partialFailure
 
xmlns:tns=https://adwords.google.com/api/adwords/cm/v201502;false/tns:partialFailure/tns:RequestHeader/SOAP-ENV:Headerns0:Bodyns1:mutatens1:operationsns2:operatorADD/ns2:operatorns1:operand
 
xsi:type=ns1:LogicalUserListns1:name[removed] list created at 20150717 
14:18:00/ns1:namens1:descriptionUsers who visited list A but not B, C 
and 
D/ns1:descriptionns1:UserList.TypeLogicalUserList/ns1:UserList.Typens1:rulesns1:operatorALL/ns1:operatorns1:ruleOperands
 
xsi:type=ns1:ExpressionRuleUserListns1:id102489659/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
 
A created at 20150717 14:17:57/ns1:namens1:descriptionUsers who visited 
a page where URL contains 
[removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperands/ns1:rulesns1:rulesns1:operatorNONE/ns1:operatorns1:ruleOperands
 
xsi:type=ns1:ExpressionRuleUserListns1:id102489779/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
 
B created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
a page where URL contains 
[removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperandsns1:ruleOperands
 
xsi:type=ns1:ExpressionRuleUserListns1:id102489899/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
 
C created at 20150717 14:17:58/ns1:namens1:descriptionUsers who visited 
a page where URL contains 
[removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperandsns1:ruleOperands
 
xsi:type=ns1:ExpressionRuleUserListns1:id102490019/ns1:idns1:isReadOnlyfalse/ns1:isReadOnlyns1:nameList
 
D created at 20150717 14:17:59/ns1:namens1:descriptionUsers who visited 
a page where URL contains 
[removed]/ns1:descriptionns1:statusOPEN/ns1:statusns1:accessReasonOWNED/ns1:accessReasonns1:accountUserListStatusACTIVE/ns1:accountUserListStatusns1:membershipLifeSpan30/ns1:membershipLifeSpanns1:listTypeRULE_BASED/ns1:listTypens1:UserList.TypeExpressionRuleUserList/ns1:UserList.Typens1:rulens1:groupsns1:itemsns1:StringRuleItemns1:keyns1:nameurl__/ns1:name/ns1:keyns1:opCONTAINS/ns1:opns1:value[removed]/ns1:value/ns1:StringRuleItem/ns1:items/ns1:groups/ns1:rule/ns1:ruleOperands/ns1:rules/ns1:operand/ns1:operations/ns1:mutate/ns0:Body/SOAP-ENV:Envelope'
ERROR:suds.client:suds.sax.document.Document object at 0x10b29f4e0

Thank you for your help,

Damien

On Friday, July 17, 2015 at