on requests.get, UnicodeEncodeError: 'latin-1' codec can't encode characters in position 89-91: ordinal not in range(256)

on requests.get, UnicodeEncodeError: 'latin-1' codec can't encode characters in position 89-91: ordinal not in range(256)

问题发生在:response = requests.get('*some url*', cookies=cookies, verify=False).text
今天早上它运行得很好,但突然抛出这个错误:

Ignoring exception in on_message
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "main.py", line 88, in on_message
    dptitle, dptags, dpcontents = dispedia.search(title)
  File "/home/runner/Dimico/dimipedia.py", line 22, in search
    response = requests.get(f'*some url*', cookies=cookies, verify=False)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.8/http/client.py", line 1252, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1293, in _send_request
    self.putheader(hdr, value)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/urllib3/connection.py", line 219, in putheader
    _HTTPConnection.putheader(self, header, *values)
  File "/usr/lib/python3.8/http/client.py", line 1225, in putheader
    values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 89-91: ordinal not in range(256)

我确实做了所有可以从 google 搜索中找到的东西,但我无法解决这个问题。 供参考(我不知道这个表达式是否正确),我是 运行 Replit(https://repl.it).

上的这段代码

在我的 .env 文件中,我有一个韩文字母的秘密值。当我把它变成十六进制文本时,效果非常好。