Helo,
I manage to run the program nut after the recognition of my vocal command, the program shuts doxn with the message bellow.
it seems that i have a problem with some ascii encoding with my program
Does anyone has the same isue?
Thanks in advance for your help
Marc
_marcelbichon@raspberrypi:~/Lumina $ python3 Lumina.py
Wake word detected
The current date and time is: 12-11-2024 10:29 AM
text window open
Listening...
Voice detected
End of query detected
You said: Sable bank in an alley
You requested the following image: Sable bank in an alley
Creating image...
Traceback (most recent call last):
File "/home/marcelbichon/Lumina/Lumina.py", line 436, in
on_message(transcript, DisplayOn_list, DisplayOff_list, CloseProgram_list, Save_list)
File "/home/marcelbichon/Lumina/Lumina.py", line 262, in on_message
draw_request(transcript)
File "/home/marcelbichon/Lumina/Lumina.py", line 184, in draw_request
image_url = dall_e3(transcript)
File "/home/marcelbichon/Lumina/Lumina.py", line 110, in dall_e3
response = client.images.generate(
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/resources/images.py", line 264, in generate
return self._post(
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 1280, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 957, in request
return self._request(
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 983, in _request
request = self._build_request(options, retries_taken=retries_taken)
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 466, in _build_request
headers = self._build_headers(options, retries_taken=retries_taken)
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 417, in _build_headers
headers = httpx.Headers(headers_dict)
File "/home/marcelbichon/.local/lib/python3.9/site-packages/httpx/_models.py", line 156, in init
bytes_value = _normalize_header_value(v, encoding)
File "/home/marcelbichon/.local/lib/python3.9/site-packages/httpx/_models.py", line 82, in _normalize_header_value
return value.encode(encoding or "ascii")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2014' in position 21: ordinal not in range(128)__
Helo,
I manage to run the program nut after the recognition of my vocal command, the program shuts doxn with the message bellow.
it seems that i have a problem with some ascii encoding with my program
Does anyone has the same isue?
Thanks in advance for your help
Marc
_marcelbichon@raspberrypi:~/Lumina $ python3 Lumina.py
Wake word detected
The current date and time is: 12-11-2024 10:29 AM
text window open
Listening...
Voice detected
End of query detected
You said: Sable bank in an alley
You requested the following image: Sable bank in an alley
Creating image...
Traceback (most recent call last):
File "/home/marcelbichon/Lumina/Lumina.py", line 436, in
on_message(transcript, DisplayOn_list, DisplayOff_list, CloseProgram_list, Save_list)
File "/home/marcelbichon/Lumina/Lumina.py", line 262, in on_message
draw_request(transcript)
File "/home/marcelbichon/Lumina/Lumina.py", line 184, in draw_request
image_url = dall_e3(transcript)
File "/home/marcelbichon/Lumina/Lumina.py", line 110, in dall_e3
response = client.images.generate(
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/resources/images.py", line 264, in generate
return self._post(
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 1280, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 957, in request
return self._request(
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 983, in _request
request = self._build_request(options, retries_taken=retries_taken)
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 466, in _build_request
headers = self._build_headers(options, retries_taken=retries_taken)
File "/home/marcelbichon/.local/lib/python3.9/site-packages/openai/_base_client.py", line 417, in _build_headers
headers = httpx.Headers(headers_dict)
File "/home/marcelbichon/.local/lib/python3.9/site-packages/httpx/_models.py", line 156, in init
bytes_value = _normalize_header_value(v, encoding)
File "/home/marcelbichon/.local/lib/python3.9/site-packages/httpx/_models.py", line 82, in _normalize_header_value
return value.encode(encoding or "ascii")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2014' in position 21: ordinal not in range(128)__