While reading file name from the S3 Bucket we are getting below exception. The filename format has extra special characters.
Eg: input%2B0%2B0000000036.json , partition%3D0/input%2B0%2B0000000037.json
Exception: "message": "An exception of type Exception occurred. Arguments:('Failure while get file from S3 - An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.',)",
Please help us in resolving this issue.
Thanks in advance.
You have to decode your url since it contains special characters.
from urllib.parse import unquote_plus result = unquote_plus('input%2B0%2B0000000036.json') print(result)
2.1m questions
2.1m answers
60 comments
57.0k users