BulkIndexError while I try to ingest data from python

I try to ingest a csv using python and it raises an error "BulkIndexError". But when I upload it using the UI in kibana it uploads perfectly, so I also tried ingesting in the same index and also tried with the index's mapping. It throws BulkIndexError.

Thanks.

Please share your code and any logs.