example-dfp-line-item-generator
example-dfp-line-item-generator copied to clipboard
Error: soap:Server: [PublisherQueryLanguageSyntaxError.UNPARSABLE @ Unable to parse query: 'Where '
Copied from https://github.com/spanishdict/node-google-dfp-wrapper/issues/24 by @brianibok
Hi All,
Getting the error below when I try to run the script to generate the line-items:
node scripts/create-line-items.js --order ORDER_NAME --start 1 --end 1
Error: Progress [=-] 50% 0.0screating line items failed because Error: soap:Server: [PublisherQueryLanguageSyntaxError.UNPARSABLE @ Unable to parse query: 'Where ' Syntax error at line 0, column 0.]
However no modifications were made to the script
I think this problem steps from this commit where we removed the ad unit name from the formatting. I think adunitid is a field required by DFP to create line items however. Maybe what we could do is add it as a parameter you pass to the script.
To test if that would work, @brianibok could you add this line below this code:
adUnitName: 'name-of-your-ad-unit',
Note that the library will look up that ad unit in DFP, so it needs to already exist
Thanks for the update Juan, this stopped the error from popping up, but no lines were actually pushed to DFP. Will review the commit to see whether there is anything else missing that needs to be added.
Disregard my last note. I am still getting the same error.
Hi JuanCaicedo,
Im still really stuck here, any ideas? What was the reason for making the changes to the commit you specified? I am considering adding these back in, but want to make sure its the right way to.
Try commenting out L634 in dfp.js in node-google-dfp-wrapper.
https://github.com/spanishdict/node-google-dfp-wrapper/blob/401a38abdcd4a61b58df365496e47d94010c4e12/lib/dfp.js#L634
.then(this.replaceAdUnitName)
This step is no longer needed. It is expecting parameters that are not longer included in this example script so it errors out.
@JuanCaicedo We should see how we can remove or only optionally call this in node-google-dfp-wrapper in a backwards compatible way.
I'm experiencing the same error message as @brianibok, I tried the above fix @nanek without luck. Will continue to investigate..
EDIT: just to add more detail to my comment, @nanek after commenting out line 634 in dfp.js in node-google-dfp-wrapper, I get a new error message when running 'node scripts/create-line-items.js ...':
$node scripts/create-line-items.js --order ORDER_NAME --start 1 --end 10
--order ORDER_NAME --start 1 --end 10
Progress [=----------] 9% 0.0screating line items failed
because Error: Expected to find results, but there were none
at extractResults (/Users/jameshume/node_modules/node-google-dfp-wrapper/lib/dfp.js:236:11)
at tryCatcher (/Users/jameshume/node_modules/bluebird/js/release/util.js:11:23)
at Promise._settlePromiseFromHandler (/Users/jameshume/node_modules/bluebird/js/release/promise.js:488:31)
at Promise._settlePromise (/Users/jameshume/node_modules/bluebird/js/release/promise.js:545:18)
at Promise._settlePromise0 (/Users/jameshume/node_modules/bluebird/js/release/promise.js:590:10)
at Promise._settlePromises (/Users/jameshume/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._fulfill (/Users/jameshume/node_modules/bluebird/js/release/promise.js:614:18)
at /Users/jameshume/node_modules/bluebird/js/release/nodeback.js:42:21
at /Users/jameshume/node_modules/node-google-dfp-wrapper/lib/user.js:75:11
at /Users/jameshume/node_modules/soap/lib/client.js:145:7
at /Users/jameshume/node_modules/soap/lib/client.js:304:7
at Request._callback (/Users/jameshume/node_modules/soap/lib/http.js:109:5)
at Request.self.callback (/Users/jameshume/node_modules/request/request.js:198:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.
Hi, I had the same issue and commenting out replaceAdUnitName line fixed it. But now I'm having trouble with the custom targeting and this query...
{ filterStatement: { query: 'Where customTargetingKeyId like '510964' and name like '1.00'' } }
This returns....
GET_VALUES_BY_STATEMENT_MUST_CONTAIN_KEY_ID The WHERE clause in the Statement.query must always contain CustomTargetingValue.customTargetingKeyId as one of its columns in a way that it is AND'ed with the rest of the query.
And I can't work out why! Any ideas?
Thanks Rich
If it helps anyone I fixed the above by creating a new query with = instead of 'like' for the Key ID...
var query = new nodeGoogleDfp.Statement("Where customTargetingKeyId = 510964 and name like '1.00'");