helallao / perplexity-ai

Unofficial API Wrapper for Perplexity.ai + Account Generator
https://perplexity.ai
MIT License
285 stars 50 forks source link

Handshake status 400 Bad Request #8

Closed KrisshRp closed 1 year ago

KrisshRp commented 1 year ago

Hii there I'm getting the following error

Error: Handshake status 400 Bad Request Traceback (most recent call last): File "e:*****\perplexity-ai-main\test.py", line 73, in print(perplexity_cli.search('Tell me somthing about life', mode='copilot', focus='internet', file=(open('myfile.txt', 'rb').read(), 'txt'))) File "e:*****\perplexity-ai-main\perplexity.py", line 143, in search self.ws.send(f'{420 + self.n}' + json.dumps([ File "C:*****\AppData\Local\Programs\Python\Python39\lib\site-packages\websocket_app.py", line 183, in send raise WebSocketConnectionClosedException( websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.

helallao commented 1 year ago

Repository updated. Use the new version.