Jump to content

I don't know about API's and I know even less about Kayako, but I need this to work for a project. Basically I am receiving and error when I try to run four lines of code that are given by the documentation for use, specifically to "initialize" or something like that. I think that the Kayako API may not work with python 3 (currently using 3.5), but I can't find anything anywhere that says what versions of python its compatible with. The error is returned from a try, except clause. The except part returns an error for using a comma and sites it as invalid syntax. It looks kind of like an old python syntax but I don't really know. Does anyone know anything about this?

Link to comment
https://linustechtips.com/topic/609209-error-installing-a-kayako-api-in-python/
Share on other sites

Link to post
Share on other sites

2 minutes ago, Lunar Evolution said:

I don't know about API's and I know even less about Kayako, but I need this to work for a project. Basically I am receiving and error when I try to run four lines of code that are given by the documentation for use, specifically to "initialize" or something like that. I think that the Kayako API may not work with python 3 (currently using 3.5), but I can't find anything anywhere that says what versions of python its compatible with. The error is returned from a try, except clause. The except part returns an error for using a comma and sites it as invalid syntax. It looks kind of like an old python syntax but I don't really know. Does anyone know anything about this?

you should post your code, it's all help us out a lot.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites

from kayako import KayakoAPI
API_URL = 'http://example.com/api/index.php'
API_KEY = 'abc3r4f-alskcv3-kvj4'
SECRET_KEY = 'vkl239vLKMNvlik42fv9IsflkFJlkckfjs'
api = KayakoAPI(API_URL, API_KEY, SECRET_KEY)

This is the code from the website to initialize the API. I can't give my exact code (for security/NDA reasons), but its pretty much this. The error comes from their directory in a file called api.py, the error is 

Traceback (most recent call last):
  File "/Users/bryancurtis/Desktop/tickets.py", line 7, in <module>
    from kayako import KayakoAPI
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/kayako/__init__.py", line 7, in <module>
    from kayako.api import KayakoAPI
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/kayako/api.py", line 469
    except urllib2.HTTPError, error:
                            ^
SyntaxError: invalid syntax

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×