Need help with official python api library

I have tried the official python api library but got an error. I am certain I’m using the proper api key because I verified it with the Wordpress plugin. I’m following the example code in the documentation:

    from infusionsoft.library import Infusionsoft
    infusionsoft = Infusionsoft('xxxx', settings.INFUSIONSOFT_API_KEY)
    contact = {'Email': 'tdkwon@gmail.com'}
    infusionsoft.ContactService('add', contact)

The error I receive is this:

    Traceback (most recent call last):
      File "C:\Users\Tom\.virtualenvs\tru\lib\site-packages\IPython\core\interactiveshell.py", line 2885, in run_code
        exec(code_obj, self.user_global_ns, self.user_ns)
      File "<ipython-input-7-100eac2430f9>", line 1, in <module>
        infusionsoft.ContactService('add', contact)
    TypeError: 'NoneType' object is not callable

I’m not very familiar with the Python SDK, but what version of Python are you running at the moment?

I’m using 2.7

This looks like it may have been caused by Commit breaks entire functionality of library · Issue #19 · infusionsoft/Official-API-Python-Library · GitHub which I have just fixed. Can you grab the latest version and try again?

1 Like

Seems to work. Now can you get this installed on pypi?

Thx!