I want in a project which involves accessing file & directories. I created a python task, which will move files from local to AWS SQS queues.
When testing locally, it works file. After deploying and running in ECS, it creates a weird path which causes
FileNotFoundError. Something like this.
FileNotFoundError: [Errno 2] No such file or directory: '/temp/project1 name/images/sample with images.pdf .BEbC2Ee3
Those characters after the file extension are the
We can’t figure it out. Why it happens!
Note: Some directories & files contain space(s).
Edit: We first move the file to a
temp location and then to SQS.
temp folder was in my machine locally(windows).
But when running from
ECS, we use
I suspect the Linux machine appended these characters.
Source: Windows Questions