Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: soap:Server: [PublisherQueryLanguageSyntaxError.UNPARSABLE @ Unable to parse query: 'Where ' #33

Open
JuanCaicedo opened this issue Nov 27, 2016 · 8 comments

Comments

@JuanCaicedo
Copy link
Contributor

Copied from nanek/node-google-dfp-wrapper#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

@JuanCaicedo
Copy link
Contributor Author

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

@brianibok
Copy link

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.

@brianibok
Copy link

Disregard my last note. I am still getting the same error.

@brianibok
Copy link

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.

@nanek
Copy link
Owner

nanek commented Dec 2, 2016

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.

@James328
Copy link

James328 commented Dec 8, 2016

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. (/Users/jameshume/node_modules/request/request.js:1082:10)

@reelcitizen
Copy link

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

@reelcitizen
Copy link

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'");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants