apache / apache/libcloud

FileNotFoundError: [Errno 2] No such file or directory:

Open
#1,843 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.1k
Forks
931
Avg merge
1d 2h
Merged PRs (30d)
4

Description

## While Trying to upload file to s3 or Azure I getting this FileNotFoundError,

We have functionality like continuously uploading files to the cloud, For the 1st iteration for some files I am getting this issue, while in the second or 3rd iteration those files are able to upload, (tried absolute file path also )

`[E 2023-01-12 10:19:58.949+00:00 mbl:405] U: Error when uploading /workspace/cam_vids/to_upload/Camera_1__2023-01-12__10-19-09__+0000.mp4:
Traceback (most recent call last):
File "/workspace/mbl.py", line 390, in __upload_to_cloud
self.libcloud_driver[str(cam_idx)].upload_object(
File "/usr/local/lib/python3.8/dist-packages/libcloud/storage/drivers/azure_blobs.py", line 1025, in upload_object
blob_size = os.stat(file_path).st_size
FileNotFoundError: [Errno 2] No such file or directory: '/workspace/cam_vids/to_upload/Camera_1__2023-01-12__10-19-09__+0000.mp4'
[D 2023-01-12 10:20:00.069+00:00 mbl:400] U: Uploaded /workspace/cam_vids/to_upload/Camera_1__2023-01-12__10-19-27__+0000.jpg to azurebucket/Camera_1__2023-01-12__10-19-27__+0000.jpg`

Contributor guide

Open the contributing guide

Research direction

Reproduce the continuous upload flow described in the issue, starting at __upload_to_cloud in mbl.py and the upload_object implementation in azure_blobs.py. Compare the first failed iteration with later successful uploads and determine the relevant file-lifecycle behavior. Done means the reported first-iteration FileNotFoundError is understood and the upload flow handles the affected files consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, python
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.