wit-ai / pywit

Python library for Wit.ai
Other
1.45k stars 359 forks source link

got an unexpected keyword argument 'access_token' #82

Closed diegodeodati closed 5 years ago

diegodeodati commented 7 years ago

Hi Guys, can anyone can help me?

This is my code that generate "got an unexpected keyword argument 'access_token'"

from wit import Wit

access_token = 'TOKEN'

def send(request, response): print request['text'] print('Sending to user...', response['text'])

actions = { 'send': send }

client = Wit(access_token=access_token, actions=actions)

resp = client.message('what is the stock price of xyz') print('Result: ' + str(resp))

avbanks commented 7 years ago

That should be your wit.ai token. It's found in your wit.ai settings.

diegodeodati commented 7 years ago

Yes i know but even if i set the token... Dont work

patrickpxp commented 7 years ago

Tue Mar 28-12:48:43-pywit$ python examples/quickstart.py XXXXTOKENXXXXX Traceback (most recent call last): File "examples/quickstart.py", line 44, in client = Wit(access_token=access_token, actions=actions) TypeError: init() got an unexpected keyword argument 'access_token'

patrickpxp commented 7 years ago

Solved on MacOS. you need to use Python3. sudo pip3 install wit python3 examples/quickstart.py XXXXTOKENXXXXX