Giter Club home page Giter Club logo

ebaysdk-python's People

Contributors

acjohnson avatar araines avatar bimusiek avatar bourdibay avatar codeastar avatar derenio avatar doihaveto avatar dunnousername avatar egdoc avatar gainskills avatar inversion avatar jeffcjohnson avatar jhug146 avatar johnsliao avatar jovanbrakus avatar jud avatar listingmirror avatar mahveotm avatar molanda avatar moorstech avatar mthaddon avatar nderkach avatar reubano avatar riozo-h avatar rowbare avatar synasius avatar timotheus avatar w- avatar wesleybowman avatar xcash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ebaysdk-python's Issues

Issue found with compatibility functions

In ebaysdk/__init__py, there are several functions for compatibility with the earlier versions of the SDK. Unfortunately, they do not work correctly if the module is imported more than once.

from ebaysdk import trading
type(trading)
function

trading()
<ebaysdk.trading.Connection at 0x28c5690>

from ebaysdk import trading
type(trading)
module

trading()
TypeError: 'module' object is not callable

It is a little easier to see the name collision this way...

import ebaysdk
type(ebaysdk.trading) # ebaysdk contains a function named trading
function

import ebaysdk.trading
type(ebaysdk.trading) # ebaysdk.trading is a module
module

How can i use multiple parameters in trading api api.excute()?

api.execute('GetOrders',{'NumberOfDays': 30}) will give what i want,but if i use api.execute('GetOrders',{'CreateTimeFrom':CreateTimeFrom},{'CreateTimeTo':CreateTimeTo}),it will tell me "error: execute() takes at most 3 arguments (4 given)".is there any samples to use CreateTimeFrom and CreateTimeTo.The api reference only show xml style.

Shopping api: NameValueList doesn't necessarily return a list

This tripped up my code. You can make a request:

from ebaysdk.shopping import Connection
api = Connection(appid=whatever)
api.execute('GetSingleItem', {'ItemID': 999999999, 'IncludeSelector':'ItemSpecifics'})

Then, with the result:

api.response_dict()['Item']['ItemSpecifics']['NameValueList']

Usually this is a list datatype so its fine, but if there is only one name/value pair it returns a single dictionary {name:value} rather than a dictionary as the only element of a list [{name:value}]

Easy to accommodate for this, I know, but if the key is called xyzList then it should probably always return a list datatype.

This is a really hard to notice bug, since in 99.9999% of all cases, if there are any item specifics, there's more than 1 so it seems like it always returns a list, but sometimes not - which took a while to debug.

Can't install with pip

Hi,

When I try to install ebaysdk-python with pip, I get the following errors:

duncan@duncan-laptop ~/my-project $ pip install ebaysdk --verbose
Downloading/unpacking ebaysdk
  Could not fetch URL http://ebay-sdk-python.googlecode.com/files/ (from http://pypi.python.org/simple/ebaysdk/): HTTP Error 404: Not Found
  Will skip URL http://ebay-sdk-python.googlecode.com/files/ when looking for download links for ebaysdk
  Using version 0.1.6.macosx-10.3-fat (newest of versions: 0.1.6.macosx-10.3-fat, 0.1.6, 0.1.3, 0.1.2, 0.1.1, 0.1.0, 0.0.3, 0.0.3, 0.0.2, 0.0.1)
  Downloading ebaysdk-0.1.6.macosx-10.3-fat.tar.gz
  Running setup.py egg_info for package ebaysdk
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
    IOError: [Errno 2] No such file or directory: '/home/duncan/my-project/build/ebaysdk/setup.py'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

IOError: [Errno 2] No such file or directory: '/home/duncan/my-project/build/ebaysdk/setup.py'

----------------------------------------
Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 980, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 216, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 255, in call_subprocess
    % (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1

Storing complete log in /home/duncan/.pip/pip.log

Expat Parse Error on GetAccount

Traceback (most recent call last):
File "", line 1, in
File "/lib/python2.7/site-packages/ebaysdk-0.1.10-py2.7.egg/ebaysdk/init.py", line 209, in execute
self.error()
File "/lib/python2.7/site-packages/ebaysdk-0.1.10-py2.7.egg/ebaysdk/init.py", line 954, in error
error_array.extend(self._get_resp_body_errors())
File "/lib/python2.7/site-packages/ebaysdk-0.1.10-py2.7.egg/ebaysdk/init.py", line 885, in _get_resp_body_errors
dom = self.response_dom()
File "/lib/python2.7/site-packages/ebaysdk-0.1.10-py2.7.egg/ebaysdk/init.py", line 252, in response_dom
dom = parseString((self._response_content or ("<%sResponse></%sResponse>" % (self.verb, self.verb))))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/minidom.py", line 1924, in parseString
return expatbuilder.parseString(string)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 2, column 10791

Error in parsing response with specific parameters

Hi there.
First, thanks for the great work :)

2 weeks ago i was able to download all the categories at level4. This week it returns an error parsing the results. But only at levelimit4. (i've just tried and at level5 it works again °_° :D )

This is the code to reproduce it (SiteID: 101 Italy)

api = trading(domain='api.sandbox.ebay.com')
api.execute('GetCategories', {
    'DetailLevel': 'ReturnAll',
    'CategorySiteID': 101,
    'LevelLimit': 4,
})

and this is the error:

  File "/usr/local/lib/python2.7/dist-packages/ebaysdk/__init__.py", line 208, in execute
    self.error()
  File "/usr/local/lib/python2.7/dist-packages/ebaysdk/__init__.py", line 889, in error
    error_array.extend(self._get_resp_body_errors())
  File "/usr/local/lib/python2.7/dist-packages/ebaysdk/__init__.py", line 827, in _get_resp_body_errors
    dom = self.response_dom()
  File "/usr/local/lib/python2.7/dist-packages/ebaysdk/__init__.py", line 251, in response_dom
    dom = parseString((self._response_content or ("<%sResponse></%sResponse>" % (self.verb, self.verb))))
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1931, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 2, column 1104979

AssertionError: please check CURL_DIR in setup.py

Just a quick note. Can instructions be added to setup SDK on windows(maybe *nix)? I believe installing pyCurl is not straight forward in windows. While installing dependencies, right at pyCurl setup , the setup halted looking for CURL_DIR.

AssertionError: please check CURL_DIR in setup.py

xml2dict adding extra dictionary {"value": the_actual_value } instead of just the_actual_value

Hello,

I have noticed the utils.xml2dict adds an extra dictionary {"value": the_actual_value } instead of just the_actual_value. I believe this makes the response_dict bigger than what it needs to be and adds incompatibilities between response_dict and the _response_content(the actual XML response).
In addition to that since the XML version and dictionary do not match (XML does not have that value: the_actual_value pattern), if one tries to use the response_dict to execute a command it will fail.

Example of how much more concise it will be without the extra dictionary:

{
  "Ack": {
    "value": "Success"
  },
  "Timestamp": {
    "value": "2014-05-17T06:08:07.648Z"
  },
  "Version": {
    "value": "871"
  },
    ...

vs:

{
  "Ack": "Success",
  "Timestamp": 2014-05-17T06:08:07.648Z",
  "Version": "871"
    ...

Example of command failure:
If we take the output of GetStore and try to use the response_dict to setup another store using SetStore, it will fail. That is due to the added {"value": the_actual_value } instead of just the_actual_value. In fact we have to manually convert the {"value": the_actual_value } back to the_actual_value in order for it to work.
Example of GetStore response_dict["Store"]["StoreCategories"]:

"CustomCategories": {
  "CustomCategory": [
    {
      "Order": {
        "value": "0"
      },
      "CategoryID": {
        "value": "1"
      },
      "Name": {
        "value": "Other"
      }
    },
    {
      "Order": {
        "value": "1"
      },
      "CategoryID": {
        "value": "641557"
      },
      "Name": {
        "value": "Cat 2"
      }
    }, ...

And here is what SetStore needs in order to setup the store:

{"Action": "Add",
"StoreCategories": {
"CustomCategory": [
  {
    "CategoryID": "1448802015",
    "Name": "Cat 2",
    "Order": "1",
    "ChildCategory": [
      {
        "CategoryID": "1530901",
        "Name": "Cat 2-1",
        "Order": "1",
        "ChildCategory": [
          {
            "CategoryID": "1558031",
            "Name": "Cat 2-1-1",
            "Order": "7"
          },
          {
            "CategoryID": "1558032",
            "Name": "Cat 2-1-2",
            "Order": "8"
          },

I think it is going to save some headache down the line if things get consistent with the XML by removing that extra dictionary.
Best,
Eras

Need errors id

Hi there,

Thanks for the great library.

I am working on the ReviseItem of trading API. If I updated one item title, ebay may response with errors. One of the common errors is :

10039
Short error: Listing cannot be revised.
Long error: The title or subtitle cannot be changed if an auction-style listing has a bid or ends within 12 hours, or a fixed price listing has a sale or a pending Best Offer.

The problem is I only can get the error string " RequestError, Severity: Error, Code: 10039, Listing cannot be revised.The title or subtitle cannot be changed if an auction-style listing has a bid or ends within 12 hours, or a fixed price listing has a sale or a pending Best Offer."
So I can't handle this error but only out this long message to customer. If i can get the error ID, i could change the error message for customer.

Please help.

Thanks,

Jeremy

findItemsByProduct requires attribute type

A findItemsByProductcall requires a productId with a type attribute set.

The resulting XML should look like this:
<ProductID type="ProductIDCodeType"> ProductIDType (string) </ProductID>
eg:
<ProductID type="EAN"> 5702014734999 </ProductID>

I couldn't find a way to produce XML like this using your SDK. Is this even possible?

Shoping module not working

Hi,
This is my first such application, and at the beginning I wanted to try your sample code:

from ebaysdk.shopping import Connection as shopping

api = shopping(domain='svcs.sandbox.ebay.com', appid="MY_APPID")
api.execute('FindPopularItems', {'QueryKeywords': 'Python'})
print api.response_dict()

And got:

Traceback (most recent call last):
  File "/home/bart/Ebay test/test2.py", line 4, in <module>
    api.execute('FindPopularItems', {'QueryKeywords': 'Python'})
  File "build/bdist.linux-x86_64/egg/ebaysdk/connection.py", line 114, in execute
  File "build/bdist.linux-x86_64/egg/ebaysdk/connection.py", line 178, in error_check
  File "build/bdist.linux-x86_64/egg/ebaysdk/connection.py", line 286, in error
  File "build/bdist.linux-x86_64/egg/ebaysdk/shopping/__init__.py", line 147, in _get_resp_body_errors
  File "build/bdist.linux-x86_64/egg/ebaysdk/connection.py", line 236, in response_dom
ebaysdk.exception.ConnectionResponseError: Invalid Verb: FindPopularItems (mismatched tag: line 1, column 429)

The same result is for any request in Shopping module, meantime Finding module works fine.

P.S. I use python 2.7 on Ubuntu 14.04 and your module installed (today) from GIT.

Best Regards
Bart

How to include binary attachments in an api.execute call? For example in UploadSiteHostedPictures can take an image attachment in the XML call.

Hi,

How can we attach binary files to an api.execute call, specifically UploadSiteHostedPictures?
In the docs it says:
If you are using binary attachments (instead of external picture URLs), you must upload them using XML version 1.0. Include the picture as a binary MIME attachment, sent after the XML input in the same POST request.
http://developer.ebay.com/devzone/xml/docs/reference/ebay/uploadsitehostedpictures.html

Thanks,
Eras

TypeError

Exception Type: TypeError
Exception Value: list2xml() takes at least 3 arguments (1 given)
Exception Location: ebaysdk/utils.py in to_xml, line 25

>>> ebaysdk.__version__
'1.0.2'

example error with GetUser

if I use Sandbox
api.execute('GetUser', {}) will result a error like this

[ERROR]:GetUser: Class: RequestError, Severity: Error, Code: 5, XML Parse error.XML Error Text: "; nested exception is:
org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.".

error imformation focus on

[DEBUG]:body=MyToken< />

and, if I do it like this,
api.execute('GetUser', {'UserID': 'MyUserID'})
it to be all right.

Unicode Problem?

This might be a bug, or I might be "doing it wrong"

from ebaysdk import finding
api = finding(appid="x")
api.execute('findItemsAdvanced', {'keywords': 'Seiko'})
print api.response_soup()

and I get:

Traceback (most recent call last):
File "findtest.py", line 4, in
print api.response_soup()
File "/home/dweintraub/ebaysdk-python/ebaysdk/init.py", line 224, in response_soup
self._response_soup = BeautifulStoneSoup(unicode(self._response_content))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 123522: ordinal not in range(128)

if I change init.py line 224 to:

self._response_soup = BeautifulStoneSoup(unicode(self._response_content, encoding='UTF-8'))

that seems to work better.

Cannot set multiple OutputSelector in GetOrders

I want to return TransactionArray and BuyerUserId, so I wrote this:
self.api.execute("GetOrders", {"OrderStatus":"Active",
"NumberOfDays": "3",
"Pagination": {"PageNumber": "1"},
"OutputSelector":"OrderArray.Order.TransactionArray",
"OutputSelector":"OrderArray.Order.BuyerUserId"})

However, it appears that only the last output selector is used, not all of them. eBay API allows for multiple OutputSelector in the request.

SandboxMode.

Sorry. I am really new, and if I missed this in the docs then forgive me.

I am using the trading API
I cant seem to understand how to switch between the sandbox and production environments.

I see the YAML has keys for both, but it seems when I run the sample it uses the Production one by default. I wanted to know if there is a fag I missed for the Sandbox?

Seems a bit unclear from the YAML which one to use. It also seems a bit confusing, perhaps one should be commented out?

Thanks.

Missed 'TransactionArray' key in response_dict()

When I call GetSellerTransactions request to Trading API and get just one Transaction then 'TransactionArray' key in response_dict() is missed.
Path to the transaction looks like: response_dict()['Transaction']

When get more than one transaction 'TransactionArray' key in response_dict() exists.
Path to first transaction looks like: response_dict()['TransactionArray']['Transaction']

I'm really confused. I can't iterate in for loop when I get just one transaction. I have to use additional condition statement. Can you fix it, please?

AttributeError: 'dict' object has no attribute 'iteritems' error

Trying to run the simple example on Github after installing ebaysdk-python under Python 3.3.4. The MY ID is the id from the ebay developers site

from ebaysdk.finding import Connection
try:
api = Connection(appid='MY ID')
api.execute('findItemsAdvanced', {'keywords': 'shoes'})

print (api.response_dict())

except ConnectionError as e:
raise e

Traceback (most recent call last):
File "<pyshell#0>", line 1, in
api = Connection(appid='MY ID')
File "C:\Python33\lib\site-packages\ebaysdk-1.0.2-py3.3.egg\ebaysdk\finding__init__.py", line 69, in init
config_file=kwargs.get('config_file', 'ebay.yaml'))
File "C:\Python33\lib\site-packages\ebaysdk-1.0.2-py3.3.egg\ebaysdk\config.py", line 38, in init
self._populate_yaml_defaults()
File "C:\Python33\lib\site-packages\ebaysdk-1.0.2-py3.3.egg\ebaysdk\config.py", line 49, in _populate_yaml_defaults
for k, val in dataobj.get(self.domain, {}).iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Any help would be greatly appreciated.

Tom

Invalid Category Error Breaks _get_resp_body_errors

For some reason the error code that eBay returns when making a shopping.getCategoryInfo() call on an invalid category is 10.54. All the other error codes are ints, but this one decided not to be. This is a problem because in _get_resp_body_errors() the error code is cast to an int, and that breaks with this error code. An example input to get this would be calling getCategoryInfo on '3410'.

Problems with installation

ebaysdkerror
I'm trying to install the ebay python SDK. I am using Python 3.3 on windows 8.1. Unfortunately I'm too new to Python to be able to debug the issue. I run the final step python.exe setup.py. I get an error: File "c:\Python33\Lib\site-packages\setuptools\dist.py", line 103 except ValueError ^, e:. I have also attached a screenshot of the console window showing the text. I would appreciate any help that is available. Thanks. Jack

Setting 'compatibility' is not used in Trading

The Trading docs include the following...

    compatibility -- version number (default: 648)

And the code sets this in the config...

    self.config.set('version', '837')
    self.config.set('compatibility', '837')

However, the header only uses 'version', not 'compatability'...

"X-EBAY-API-COMPATIBILITY-LEVEL": self.config.get('version', '')

How to use HTML in Trading dictionary?

I'd like to use HTML codes in the description field when listing an item. When I do, I get:

Error, Code: 20170, Schema XML request error.Schema XML request error: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

It appears that the field needs to be escaped with CDATA - it doesn't appear that there's an easy way to do this from the dictionary.

Installation Error on MacOS with Python 3.3

It seems like python 3.3 doesn't support some of the syntax in the setup.py

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.3/bin/easy_install", line 9, in
load_entry_point('setuptools==2.0', 'console_scripts', 'easy_install')()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 1909, in main
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 1896, in with_ei_usage
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 1913, in
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 929, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 948, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 358, in run
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 569, in easy_install
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 625, in install_item
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 671, in process_distribution
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/pkg_resources.py", line 559, in resolve
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/pkg_resources.py", line 797, in best_match
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/pkg_resources.py", line 809, in obtain
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 593, in easy_install
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 623, in install_item
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 809, in install_eggs
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 1015, in build_and_install
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/easy_install.py", line 1000, in run_setup
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/sandbox.py", line 50, in run_setup
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/sandbox.py", line 100, in run
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/sandbox.py", line 52, in
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/compat.py", line 78, in execfile
File "setup.py", line 317, in
File "setup.py", line 312, in run_setup
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 929, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 948, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/bdist_egg.py", line 185, in run
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/bdist_egg.py", line 171, in call_command
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 948, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-2.0-py3.3.egg/setuptools/command/install_lib.py", line 20, in run
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/dist.py", line 948, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/command/build_ext.py", line 353, in run
self.build_extensions()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/distutils/command/build_ext.py", line 462, in build_extensions
self.build_extension(ext)
File "setup.py", line 235, in build_extension
File "setup.py", line 232, in gevent_prepare
File "setup.py", line 139, in configure_libev
File "setup.py", line 111, in make_universal_header
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'

Creating a source distribution fails because of missing dependencies

After cloning the HEAD of this repo, I tried to build a distribution package by calling python setup.py sdist it failed with the following output:

Traceback (most recent call last):
  File "setup.py", line 24, in <module>
    execfile('./ebaysdk/__init__.py')
  File "./ebaysdk/__init__.py", line 3, in <module>
    import yaml, pycurl, urllib
ImportError: No module named yaml

It is correct that I have not yet installed the PyYaml and the pycurl packages, however the requirements section in the setup.py file should take care of that. Directly installing from github.com with pip install git+git:// gives the same result.

Steps to reproduce

  1. Create a new virtualenv without any site-packages
  2. Clone the repo
  3. Run python setup.py sdist

Checked out commit 99145195967e20bfedb364e451912e88d251d7e1.

AddItem and multiple images?

how can I achieve multiple PictureURL nodes in a single AddItem call? Does this sdk have a syntax to add a list of the PictureURLs into the dictionary? Can't find anything on this... apologies if I missed it..

Exception handling

Currently exceptions are caught and written to stdout. There are a few issues with this approach. First, it means the program cannot catch and handle them further up the stack. It effectively means all errors are silent and require checking several things to be detected. It also results in unhelpful errors (try doing a search with the finding API using a bad appid). Second, writing to stderr is horribly unpythonic. There is a warnings module and a logging module that can both be used to print/log messages and handle them far more flexibly than just writing to stderr (which, again, requires looking through log files to find).

when I try to use find api I get exception with Session from requests module

'Session' object has no attribute 'mount'
File "ebay_api_testing.py", line 5, in
api = finding(appid='OldSkool-23c9-4cbb-8e3e-efbeac64e27d')
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ebaysdk-1.0.1-py2.7.egg/ebaysdk/init.py", line 77, in finding
return Finding(_args, *_kwargs)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ebaysdk-1.0.1-py2.7.egg/ebaysdk/finding/init.py", line 65, in init
super(Connection, self).init(method='POST', **kwargs)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ebaysdk-1.0.1-py2.7.egg/ebaysdk/connection.py", line 75, in init
self.session.mount('http://', HTTPAdapter(max_retries=3))

Example returns None

By your instruction, I edited YAML file to include our password, username, appid, certid and devid in Trading, Shopping and Finding/Merchandising

Installed ebaysdk and attempted running the example provided on the main page of this project on Git Hub.

The resulting output is as follows:
None

If I print "f.error()", i get the following text:
findItemsAdvanced error:
Error sending request:Internal Server Error

Is this an issue because I am not sending a Token (even though according to eBay documentation I can pass a User Name and Password instead)?

How to use GetOrders api in case of different-different sellers

Hi,
I am using same sdk for integration with Ebay but I am facing some issue. In trading GetOrders API I need to pass some credentials like app_id, cert_id, dev_id and user token
and all credentials i can get from developer account and for token i can get using get_token by linking seller account to developer account. that is perfectly fine.

but I have different kind of setup,
lets say I have dev account so I will have app_id, cert_id, dev_id, no problem. but I don't have seller account. I want to access orders of some others different different sellers if they authorize me to fetch the orders. so I am not clear in this step that -
1 - how a seller will give access to me ( means to developer ) ?? or can be said how seller provide access to third party fulfillment
2 - if he gives us the access then how would I use GetOrders API to fetch orders because except token there is not credential parameter for vendors/sellers as i know if any please let me know ??

please help me or if you guys have some defined steps please share with me so that i can figure out the way.

thank you

Unicode no longer works in Python 2

Since 1.0 I haven't been able to get unicode through ebaysdk in Python 2.7.

The first problem is that utils._convert_dict_to_xml_recurse calls str() on everything: https://github.com/timotheus/ebaysdk-python/blob/master/ebaysdk/utils.py#L377-L391

I thought I could get past this by using encode('utf-8') on my unicode strings but then I run into a problem in utils.to_string which chokes because etree tries to encode the text again using xmlcharrefreplace and complains of unknown bytes: https://github.com/timotheus/ebaysdk-python/blob/master/ebaysdk/utils.py#L501

Attributes.

Pardon me again if this is just noise.

But I am not clear how to Add the "currencyID" Attribute to my Shipping Details.

I am looking in the docs and samples.

Here is the code I tried.

"ShippingDetails": {
"ShippingType": "Flat",
"ShippingServiceOptions": {
"ShippingServicePriority": "10",
"ShippingService": "USPS First Class Package",
"ShippingServiceCost": {"currencyID":"USD", "value":"1.99"},
}
},

This is obviously wrong as it creates an element and not an attribute.

Thanks.

ReviseItem call is giving error

This is how i'm trying to update the price of Item identified by itemID

from ebaysdk.trading import Connection
api = Connection(appid='',certid=' ',devid=' ',token=' ')
ItemID=151308915152
newprice=23456
api.execute('ReviseItem',{'ItemID':ItemID,'BuyItNowPrice':newprice})

But I'm getting this error---

api.execute('ReviseItem',{'ItemID':ItemID,'BuyItNowPrice':newprice})
File "build/bdist.linux-x86_64/egg/ebaysdk/connection.py", line 120, in execute
File "build/bdist.linux-x86_64/egg/ebaysdk/connection.py", line 188, in error_check
ebaysdk.exception.ConnectionError: ReviseItem: Class: RequestError, Severity: Error, Code: 17, Item cannot be accessed.This item cannot be accessed because the listing has been deleted, is a Half.com listing, or you are not the seller.

Please do help me.Thanks in Advance

It must not always print errors

Hi there.
When the library is used in a daemon it is disruptive that it prints errors to stderr.
You can disable automatic printing of warnings but not errors.

Could you introduce an errors flag like warnings?

I can do it and make a pull request if you accept this suggestion.

No support for ErrorLanguage

ebaysdk-python doesn't seem to have a support to ErrorLanguage, which could be use with Trading API.

It could be a good improvement.

Finding functionality broken?

I am testing by using the URL parameters in the example here:
http://developer.ebay.com/DevZone/finding/CallRef/findItemsByProduct.html#Samples

Code:
api = finding(appid=APP_ID, debug=True, warnings=True)
api.execute('findItemsByProduct', {'productId.@type': 'ReferenceID', 'productId':'53039031'})
if api.error():
return "has errors: %s" % api.error()

xml = api.response_content()

Result is:
has errors: findItemsByProduct: Internal Server Error, Domain: CoreRuntime, Severity: Error, errorId: 5014, Error reading from XML stream: Unexpected character '' (code 92) excepted space, or '>' or "/>" at javax.xml.stream.SerializableLocation@124f124f

Can not add multiple pictures when listing an item

When I used trading api to list a new item, I was not able to add multiple pictures because the "item" that is passed to the API is a dictionary. And python does not support duplicate keys in a dictionary.

I am not able to do the following:

item = {"PictureDetails":
"PictureURL": url1
"PictureURL": url2
...
}

GetOrders

I am reading the ebay docs located at.

http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/GetOrders.html

(Note these docs are for v833, and this API call looks like from v837)
But I dont think this matters because the root Doc URL says rev 837, but if you click on the link for the call you get version 833

http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/index.html

It says the following in the first paragraph...

Executing a GetOrders call with no input filters returns all active (pending) and completed (paid) single and multiple line item orders. To limit the amount of orders that are returned, or to returned specific orders, the caller can use filters in the following ways:

when I call

api.execute('GetOrders',{})

I get an Error Response Back From Ebay.

I dont know if this is by virtue of the Library Sending The Wrong Request, or Poor Documentation by Ebay.

Here is the error.

{
"Ack": {
"value": "Failure"
},
"Build": {
"value": "E837_INTL_APIXO_16317172_R1"
},
"Errors": {
"ErrorClassification": {
"value": "RequestError"
},
"ErrorCode": {
"value": "10009"
},
"ErrorParameters": {
"ParamID": {
"value": "0"
},
"Value": {
"value": "CreateTimeFrom"
}
},
"LongMessage": {
"value": "Non esiste nessun oppure \u00e8 specificato come un tag vuoto nella richiesta "
},
"SeverityCode": {
"value": "Error"
},
"ShortMessage": {
"value": "Non esiste nessun oppure \u00e8 specificato come un tag vuoto."
}
},
"Timestamp": {
"value": "2013-08-30T12:07:03.772Z"
},
"Version": {
"value": "837"
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.