-
Notifications
You must be signed in to change notification settings - Fork 187
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
ai_dubs: Getting SSL error when uploading to bucket #33
Comments
I don't know the answer to this, but if you do install SSL separately and it works, could you let me know? :) |
installing ssl throws an error because it looks like that module was made for python2 but it's now included in 3 |
I tried with a much smaller video file (about 1Mb) and was able to get it to upload without failing but now I'm just a bit further. It now complains about the wav file's path. I'm not sure if this is a windows issue here since the / \ is inconsistent. The file itself is in my bucket though google.api_core.exceptions.InvalidArgument: 400 Audio URI Console Output: The above exception was the direct cause of the following exception: Traceback (most recent call last): |
I'm getting the following error when trying to upload to the bucket
it seems to be complaining about max retries exceeded. At first i thought this could be an issue with my .json key but the path in the environment variable there looks fine.
do i need to separately install open ssl like I did for ffmpeg?
stack trace below:
`Transcribing audio
Uploading to the cloud...
Traceback (most recent call last):
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1253, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1299, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1248, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1047, in _send_output
self.send(chunk)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 969, in send
self.sock.sendall(data)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1204, in sendall
v = self.send(byte_view[count:])
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1173, in send
return self._sslobj.write(data)
ssl.SSLWantWriteError: The operation did not complete (write) (_ssl.c:2477)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 439, in send resp = conn.urlopen(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /upload/storage/v1/b/ppc-video/o?uploadType=resumable&upload_id=ABg5-UxHTYHlMAmIxsMZIRV7Lh98eNQRyy3T4GR9ZRPy8xBQ4cKPsPQZyGq-0USNWO8kR-VKjsgEvzrIHsX3Dq5rkjYT_Koihw (Caused by SSLError(SSLWantWriteError(3, 'The operation did not complete (write) (_ssl.c:2477)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\anton\Documents\GitHub\making_with_ml\ai_dubs\dubber.py", line 531, in
fire.Fire(dub)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 463, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "C:\Users\anton\Documents\GitHub\making_with_ml\ai_dubs\dubber.py", line 447, in dub
blob.upload_from_filename(os.path.join(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\cloud\storage\blob.py", line 2460, in upload_from_filename
self.upload_from_file(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\cloud\storage\blob.py", line 2343, in upload_from_file
created_json = self._do_upload(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\cloud\storage\blob.py", line 2180, in _do_upload
response = self._do_resumable_upload(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\cloud\storage\blob.py", line 2041, in _do_resumable_upload
response = upload.transmit_next_chunk(transport, timeout=timeout)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\resumable_media\requests\upload.py", line 496, in transmit_next_chunk
response = _request_helpers.http_request(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\resumable_media\requests_request_helpers.py", line 136, in http_request
return _helpers.wait_and_retry(func, RequestsMixin._get_status_code, retry_strategy)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\resumable_media_helpers.py", line 186, in wait_and_retry
raise error
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\resumable_media_helpers.py", line 175, in wait_and_retry
response = func()
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\google\auth\transport\requests.py", line 464, in request
response = super(AuthorizedSession, self).request(
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, **kwargs)
File "C:\Users\anton\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 514, in send raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /upload/storage/v1/b/ppc-video/o?uploadType=resumable&upload_id=ABg5-UxHTYHlMAmIxsMZIRV7Lh98eNQRyy3T4GR9ZRPy8xBQ4cKPsPQZyGq-0USNWO8kR-VKjsgEvzrIHsX3Dq5rkjYT_Koihw (Caused by SSLError(SSLWantWriteError(3, 'The operation did not complete (write) (_ssl.c:2477)')))`
The text was updated successfully, but these errors were encountered: