Open oerp-odoo opened 10 years ago
I'm getting this too :/
OP, did you get it working?
Hi - You have the wrong sandbox domain defined, which in turn is throwing a parse error. The correct sandbox domain for the Shopping API is open.api.sandbox.ebay.com.
I'll likely add a sandbox flag to the constructor to avoid this type of mistake. It's come up a few times with users of this sdk.
btw, here a useful endpoint page I just came across.
Thanks mate. Got it working.
I'm having an error with the preset example "newItem" data.
Let me jump on my computer and I'll have a look what it's throwing.
On 18 Aug 2014, at 1:41 am, "Tim Keefer" notifications@github.com wrote:
Hi - You have the wrong sandbox domain defined, which in turn is throwing a parse error. The correct sandbox domain for the Shopping API is open.api.sandbox.ebay.com.
I'll likely add a sandbox flag to the constructor to avoid this type of mistake. It's come up a few times with users of this sdk.
btw, here a useful endpoint page I just came across.
— Reply to this email directly or view it on GitHub.
I'm getting this same error when not specifying a sandbox, just using the example from the docs:
from ebaysdk.shopping import Connection as shopping
api = shopping()
api.execute('findItemsAdvanced', {'keywords': 'legos'})
-> AttributeError: 'Response' object has no attribute '_dom'
I was using the sandbox key, you need to use the other one. :-)
On 1 Oct 2014, at 3:51 am, "Andrew Badr" notifications@github.com wrote:
I'm getting this same error when not specifying a sandbox, just using the example from the docs: from ebaysdk.shopping import Connection as shopping api = shopping() api.execute('findItemsAdvanced', {'keywords': 'legos'})
-> AttributeError: 'Response' object has no attribute '_dom'
— Reply to this email directly or view it on GitHub.
@andymcb1 So the shopping api defaults to the sandbox, but the trading api defaults to production? I'm a bit confused.
I had the same error, figured it out, it is reeeally stupid. The different ebay APIs use different function call capitalization. For example, this is a call for finding API: findItemsByProduct, where you specify a productId. Notice that the first letters are not capitalized, and neither is the 'd' in the 'Id'. It's different for the shopping API however, this is what we have there (for example): GetSingleItem, which takes ItemID. Notice the different capitalization. I was calling Shopping API with getSingleItem and itemId, and this was causing the AttributeError. Arggh ]:<
Is there a reason this error would appear spontaneously? I had a script running using the API for a few days and then this suddenly appeared.
@FintanH can you share the error? (enable debug and send the entire request/response)
@timotheus: I'll do my best. As I said it was spontaneous in its appearance, 99.99% of the time it works perfectly and was very unexpected.
@timotheus I have an example request that bombed out with the AttributeError but subsequently was able to retrieve the item.
from ebaysdk.shopping import Connection as Shopping
pars = {"ItemID": "162389043741", "version": 981, "IncludeSelector": "Variations"}
r = Shopping(appid=myappid, config_file=None).execute('GetSingleItem', pars)
print(r.dict())
Could this be something to do with the API not receiving the call for some reason?
I have this error and cannot figure out a solution even with your discussion here. It works 99% of the time on my macbook but this error appears every attempt to run it on linux server. I have checked proxy settings, credentials, domain specifications, etc. but no luck. Any further ideas please?
Try to add https=True
. E.g. Shopping(domain="svcs.sandbox.ebay.com", config_file="ebay.yaml", https=True)
The default one doesn't use HTTPS and it returns HTML not XML, which cause the parsing error.
above solution worked for me
I get mentioned error when running this piece of code:
Whole error: