Azure Core Exceptions Serviceresponseerror Connection Aborted Timeoutthe Write

[Solved] Azure Core Exceptions Serviceresponseerror Connection Aborted Timeoutthe Write | Solidity - Code Explorer | yomemimo.com
Question : azure.core.exceptions.ServiceResponseError: ('Connection aborted.', timeout('The write operation timed out'))

Answered by : siboniso-nkosi

def upload_audio(audio,file_name): self.blob_service_client.max_single_put_size = 4*1024*1024 self.blob_service_client.timeout = 180 # Create blob with same name as local file name blob_client = self.blob_service_client.get_blob_client(container=self.MY_IMAGE_CONTAINER,blob=file_name) # Create blob on storage # Overwrite if it already exists! audio_content_setting = ContentSettings(content_type='audio/mpeg') print(f"uploading file - {file_name}") blob_client.upload_blob(audio,overwrite=True,content_settings=audio_content_setting, blob_type="BlockBlob", connection_timeout=600) print('*************Uploaded**********')
file = open('file_path', 'rb')
upload_audio(file, "myfile.mp3")

Source : | Last Update : Wed, 18 May 22

Answers related to azure core exceptions serviceresponseerror connection aborted timeoutthe write operation timed out

Code Explorer Popular Question For Solidity