[Bug]: UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
When running revChatGPT.V1 in command line, after sending prompt, got this error UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)
Steps to reproduce the problem
- update to 3.1.0
- use command line to send arbitrary message
What should have happened?
getting correct result
Version where the problem happens
3.1.0
What Python version are you running this with?
Python 3.10.9
What is your operating system ?
Ubuntu 20.04 LTS x86_64
Command Line Arguments
python -m revChatGPT.V1
Console logs
Press Esc followed by Enter or Alt+Enter to send a message.
Logging in...
You:
hi
Chatbot:
Traceback (most recent call last):
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/revChatGPT/V1.py", line 1034, in <module>
main(configure())
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/revChatGPT/V1.py", line 54, in wrapper
out = func(*args, **kwargs)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/revChatGPT/V1.py", line 1009, in main
for data in chatbot.ask(prompt):
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/revChatGPT/V1.py", line 486, in ask
response = self.session.post(
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/http/client.py", line 1323, in _send_request
self.putheader(hdr, value)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/site-packages/urllib3/connection.py", line 224, in putheader
_HTTPConnection.putheader(self, header, *values)
File "/home/lcf/miniconda3/envs/chatgpt_env/lib/python3.10/http/client.py", line 1255, in putheader
values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)
### Additional information
_No response_
This issue is stale because it has been open for 2 days with no activity.
This issue was closed because it has been inactive for 3 days since being marked as stale.
I am also having the same problem. My environment is: macOS 10.13.6 Python 3.8.5.
How was it solved?
Have you managed to solve it? Because I haven't.
Same problem guyyyssshhhhh