MichielvanBeers / Flow.Launcher.Plugin.ChatGPT

MIT License
37 stars 5 forks source link

UnicodeEncodeError #39

Open luwukien opened 1 year ago

luwukien commented 1 year ago

Please type any relevant information here

Trace Log

``` Traceback (most recent call last): File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\flox\launcher.py", line 44, in run results = request_method(*request_parameters) or self._results File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\flox\__init__.py", line 132, in _query self.query(query) File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\plugin\main.py", line 59, in query answer, prompt_timestamp, answer_timestamp = self.send_prompt( File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\plugin\main.py", line 122, in send_prompt response = requests.request( File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\requests\api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\requests\sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\requests\adapters.py", line 489, in send resp = conn.urlopen( File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\urllib3\connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\urllib3\connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "http\client.py", line 1252, in request File "http\client.py", line 1293, in _send_request File "C:\Users\IdeaPad\AppData\Roaming\FlowLauncher\Plugins\ChatGPT-1.1.2\lib\urllib3\connection.py", line 224, in putheader _HTTPConnection.putheader(self, header, *values) File "http\client.py", line 1225, in putheader UnicodeEncodeError: 'latin-1' codec can't encode character '\u01a1' in position 18: ordinal not in range(256) ```

MichielvanBeers commented 1 year ago

Hi @luwukien,

It looks like there is non-latin-1 character in your API key. This is a bit surprising though, since I haven't seen this before. Could you validate that you have correctly copy/pasted your API key from OpenAI. Or maybe generate a new one and see if that works?

luwukien commented 1 year ago

Hi @MichielvanBeers

I try change API of Chat GPT but I always see this error : image

MichielvanBeers commented 1 year ago

Hi @luwukien,

This is most likely due to the fact that you haven't defined a payment method in your account. If you link a payment method, I expect it to work.