skip to Main Content

I am trying to execute the below code, but I get an error as in the title. ebaysdk was installed using pip3, then easy_install and still the error, despite all dependencies being satisfied at the installation, yet no ebaysdk.py file, please see my code below:

import datetime
from ebaysdk.exception import ConnectionError
from ebaysdk.finding import Connection

try:
    api = Connection(appid=**<mykey>**, config_file='ebay.yaml')
    response = api.execute('findItemsAdvanced', {'keywords': 'legos'})

    assert(response.reply.ack == 'Success')
    assert(type(response.reply.timestamp) == datetime.datetime)
    assert(type(response.reply.searchResult.item) == list)

    item = response.reply.searchResult.item[0]
    assert(type(item.listingInfo.endTime) == datetime.datetime)
    assert(type(response.dict()) == dict)

except ConnectionError as e:
    print(e)
    print(e.response.dict())

I am using Python 3.6 (Anaconda), working with timotheus’ ebaysdk – https://github.com/timotheus/ebaysdk-python.

I would greatly appreciate your help.

3

Answers


  1. Chosen as BEST ANSWER

    Problem solved.

    Apart from 3.6 I also had 3.5.2 and 2.7. Got rid of all versions and re-installed clean 3.6.


  2. Following solution worked for me:

    I was getting this issue when I installed ebaysdk with:

    pip3 install ebaysdk
    

    After uninstalling it I again installed by using:

    pip install ebaysdk
    

    This worked fine for me

    Login or Signup to reply.
  3. I had the same issue on my Ubuntu 20.04.5 LTS.

    The mistake made was to install flask using the OS package manager (apt) instead of pypi (pip or pip3).

    If you are on the same environment:

    sudo apt purge python3-flask
    

    then:

    pip install flask
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search