closeio / closeio-api

Python API Client for Close
http://developer.close.com/
MIT License
65 stars 47 forks source link

ImportError no module named closeio_api #71

Closed kinnth closed 8 years ago

kinnth commented 8 years ago

Hi

I've followed the README instructions but Python still can't find closeio_api when I'm executing the merge_leads script. What could be wrong? I guess somehow the closeio_api isn't being included when I'm executing the script.

(venv) TK-Max:closeio-api tk$ pwd
/Users/tk/closeio-api
(venv) TK-Max:closeio-api tk$ python ./scripts/merge_leads.py
Traceback (most recent call last):
  File "./scripts/merge_leads.py", line 40, in <module>
    from closeio_api import Client as CloseIO_API
ImportError: No module named closeio_api

If I install closeio_api through pip it will get past this error but then there it seems to be incompatible with what the script expects from the get command:


(venv) TK-Max:closeio-api tk$ python ./scripts/merge_leads.py  --api-key API_KEY
Traceback (most recent call last):
  File "./scripts/merge_leads.py", line 173, in <module>
    '_fields': 'id,display_name,name,contacts,status_label,opportunities'
TypeError: get() got an unexpected keyword argument 'params'

How do I include the closeio_api since python doesn't seem to pick it up

Thanks

thomasst commented 8 years ago

Three options:

1) PYTHONPATH=. python ./scripts/merge_leads.py 2) pip install closeio (we should remove closeio_api from PyPi) 3) python setup.py install within the package directory

thomasst commented 8 years ago

FYI also opened https://github.com/closeio/closeio-api/issues/72 and fixed README in https://github.com/closeio/closeio-api/commit/75eb52f482f75d277723aff8cadd3e2e32faa005

kinnth commented 8 years ago

@thomasst same problem closeio package doesn't seem to be correct. but the third option worked, thanks!