Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alot of traceback errors #12

Open
theson122333 opened this issue Jul 24, 2023 · 5 comments
Open

Alot of traceback errors #12

theson122333 opened this issue Jul 24, 2023 · 5 comments

Comments

@theson122333
Copy link

I am doing this for a school project as part of my final. soon as I try and use it
Wake word detected

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/httpsession.py", line 465, in send
urllib_response = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 507, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
raise value
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <botocore.awsrequest.AWSHTTPSConnection object at 0xdfbcbe68>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/medwards/DaVinci/DaVinci.py", line 294, in
voice(random.choice(prompt))
File "/home/medwards/DaVinci/DaVinci.py", line 99, in voice
voiceResponse = polly.synthesize_speech(Text=chat, OutputFormat="mp3",
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/client.py", line 534, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/client.py", line 959, in _make_api_call
http, parsed_response = self._make_request(
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/client.py", line 982, in _make_request
return self._endpoint.make_request(operation_model, request_dict)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/endpoint.py", line 119, in make_request
return self._send_request(request_dict, operation_model)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/endpoint.py", line 202, in _send_request
while self._needs_retry(
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/endpoint.py", line 354, in _needs_retry
responses = self._event_emitter.emit(
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/hooks.py", line 412, in emit
return self._emitter.emit(aliased_event_name, **kwargs)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/hooks.py", line 256, in emit
return self._emit(event_name, kwargs)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/hooks.py", line 239, in _emit
response = handler(**kwargs)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/retryhandler.py", line 207, in call
if self._checker(**checker_kwargs):
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/retryhandler.py", line 284, in call
should_retry = self._should_retry(
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/retryhandler.py", line 320, in _should_retry
return self._checker(attempt_number, response, caught_exception)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/retryhandler.py", line 363, in call
checker_response = checker(
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/retryhandler.py", line 247, in call
return self._check_caught_exception(
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/retryhandler.py", line 416, in _check_caught_exception
raise caught_exception
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/endpoint.py", line 281, in _do_get_response
http_response = self._send(request)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/endpoint.py", line 377, in _send
return self.http_session.send(request)
File "/home/medwards/.local/lib/python3.9/site-packages/botocore/httpsession.py", line 494, in send
raise EndpointConnectionError(endpoint_url=request.url, error=e)
botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://polly.editing.amazonaws.com/v1/speech"
^CException ignored in: <module 'threading' from '/usr/lib/python3.9/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 1428, in _shutdown
lock.acquire()
KeyboardInterrupt:

@DevMiser
Copy link
Owner

It looks like your errors may be originating from AWS Polly. I would retry the following command in a terminal:
pip3 install boto3
If that does not work, check your version of Python by entering the following command in a terminal:
python --version
If it does not return Python 3.8 or later, you will need to update to a newer version of Python.
If that does not work, check this documentation: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html
I hope that helps.

@theson122333
Copy link
Author

i tried installing boto3, said it was already there
It shows im using python version 3.9.2
i tried installing everything again to make sure I got everything. After running again and eltting it go for a litlte while, i got this message
botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://polly/editing.amazonaws.com/v1/speech"
Maybe I typed in the accces key incorrectly? im trying to figure out how to retype them in the terminal
Thank you for helping me with this, I appreciate your time

@DevMiser
Copy link
Owner

From this error, it appears you may be trying to connect to an incorrect or invalid endpoint URL for the Polly service. Check whether you are using the default region name closest to you here: https://docs.aws.amazon.com/general/latest/gr/rande.html#pol_region

@theson122333
Copy link
Author

I got it working. I retyped in all the access keys and redid the region name and got it to work Thank you so much for your hard work on this.
Also wondering, how do you get this to work without using a monitor? I noticed you have to use the terminal to turn it on. Do you turn it on, unplug everything then just let it run?
Again thank you so much. This was a very fun project and its really cool

@DevMiser
Copy link
Owner

DevMiser commented Aug 4, 2023

I am happy to hear that you got it working!
Yes, you do need a monitor to start the program. You can then unplug it. You may want to enable VNC or SSH on your Raspberry Pi so that you can log onto it remotely via Wi-Fi with a PC instead of physically attaching a monitor to the Pi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants