wit-ai / pywit

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

wit.wit.WitError: Wit responded with status: 500 (Internal Server Error) #156

Closed DhineshKS04 closed 3 years ago

DhineshKS04 commented 3 years ago

from wit import Wit client = Wit(access key) resp = client.message("my name is shah")

after 5 calls it giving server error

Traceback (most recent call last): File "chat.py", line 4, in resp = client.message("my name is shah") File "/home/dhinesh/witp/lib/python3.8/site-packages/wit/wit.py", line 69, in message resp = req(self.logger, self.access_token, 'GET', '/message', params) File "/home/dhinesh/witp/lib/python3.8/site-packages/wit/wit.py", line 41, in req raise WitError('Wit responded with status: ' + str(rsp.status_code) + wit.wit.WitError: Wit responded with status: 500 (Internal Server Error)

why it gives such error, anyone?

wangsnowyin11 commented 3 years ago

Hi, Thanks for using our product! It would help a lot if you can provide more info,

  1. What's the app_id?
  2. Is the 500 error continuously reproducible?
  3. When you use the annotation bar in your domain for the utterance, whether you can get correct prediction back?
chessai commented 3 years ago

I can't reproduce. Once you answer @wangsnowyin11's questions we can provide more assistance.

DhineshKS04 commented 3 years ago

Hi, @wangsnowyin11

App ID: 519381552530299 yeah am getting error continuously.

abv commented 3 years ago

I am running into the same issue when I simply curl. My app id is 3745799722113420.

curl 'https://api.wit.ai/message?v=20210513&q=hello' -i -H 'Authorization: Bearer XXXXXXX'

returns

HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=UTF-8
x-fb-request-id: AZ6b5Xd2CZPAA880JpTy-Ax
Strict-Transport-Security: max-age=31536000; preload; includeSubDomains
x-fb-trace-id: CBDPFt0tZZw
x-fb-rev: 1003900004
Cache-Control: no-store
Vary: Origin
Vary: Accept-Encoding
Pragma: no-cache
Access-Control-Allow-Origin: *
wit-api-version: v1.0
Expires: Sat, 01 Jan 2000 00:00:00 GMT
WWW-Authenticate: OAuth "Facebook Platform" "invalid_request" ""
X-FB-Debug: cliWCU6bqX3PCp+Kh0AwjJEimoQxOB7HDfiENo+NunwsblQvKXKp+t7Uc/GFrwVSep7bJPi/GX0Pw0FK/hF9+A==
Date: Thu, 03 Jun 2021 18:24:23 GMT
Connection: keep-alive
Content-Length: 70

{"error":"Something went wrong. We've been notified","code":"unknown"}% 

Making GET requests (with the same token) to other api endpoints, such as /intents or /apps succeed. But I consistently get this error when hitting the /message endpoint. Users also appear to be reporting this issue in the main wit repo (like in https://github.com/wit-ai/wit/issues/2099)

roots-ai commented 3 years ago

Facing the same issue. APP_ID: 783739145520383

chessai commented 3 years ago

This should now be resolved. See https://github.com/wit-ai/wit/issues/2105#issuecomment-860916172