-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wit responded with status 400 #79
Comments
Case closed, resolved |
Hi @luis990 , I'm experiencing the same problem. The code I simply tested, directly from the README:
Were there any insights on this that helped you solve it? |
Is your access token your “private” token? |
The Client seems to raise an error when response's request code is 400, not letting itself raise the second error which contains information about the error. |
I'm having the same problem! Could you provide a solution, please? |
I have used the sample code from git but having the same problem. Any help would be appreciated? Below is the code
|
Use Server access token available under settings page for the wit.ai bot. |
I have the following code running on a Raspberry Pi in python 3:
from wit import Wit
import speech_recognition as sr
access_token='Here I have putted my access token'
r = sr.Recognizer()
def send(request, response):
print('Sending to user...', response = ['text'])
def my_action(request):
print('Recieved from user', request['text'])
actions = {
'send': send,
'my_action': my_action,
}
client = Wit(access_token=access_token, actions=actions)
resp = client.message('Hola')
print(resp)
But when I run it the following error appears:
Traceback (most recent call last):
File "/home/pi/Desktop/LL.py", line 22, in
resp = client.message('Hola')
File "/usr/local/lib/python3.4/dist-packages/wit/wit.py", line 72, in message
resp = req(self.logger, self.access_token, 'GET', '/message', params)
File "/usr/local/lib/python3.4/dist-packages/wit/wit.py", line 34, in req
' (' + rsp.reason + ')')
wit.wit.WitError: Wit responded with status: 400 (Bad Request)
Any help would be very much appreciated as I am relatively new to programming
The text was updated successfully, but these errors were encountered: