Boa tarde a todos!
Ao gerar a função indexa_colecao o Pycharm me retorna o erro abaixo. Alguem mais passou por isso?
Traceback (most recent call last):
File "C:\Users\marce\PycharmProjects\Face_analise\index.py", line 29, in <module>
indexa_colecao(imagens)
File "C:\Users\marce\PycharmProjects\Face_analise\index.py", line 15, in indexa_colecao
response = client.index_faces(
File "C:\Users\marce\PycharmProjects\Face_analise\venv\lib\site-packages\botocore\client.py", line 515, in _api_call
return self._make_api_call(operation_name, kwargs)
File "C:\Users\marce\PycharmProjects\Face_analise\venv\lib\site-packages\botocore\client.py", line 934, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the IndexFaces operation: The collection id: faces does not exist
segue codigo utilizado:
def indexa_colecao(imagens):
for i in imagens:
response = client.index_faces(
CollectionId='faces',
DetectionAttributes=[
],
ExternalImageId=i[:-4],
Image={
'S3Object': {
'Bucket': 'fa-imagens-marcasseb',
'Name': i,
},
},
)