Pinecone Python Client upsert is returning an error response


I am getting below error while trying to upsert the data.

/usr/local/lib/python3.10/dist-packages/pinecone/core/client/ in attempt_convert_item(input_value, valid_classes, path_to_item, configuration, spec_property_naming, key_type, must_convert, check_type)
1425 # of this for us
1426 if configuration is None or not configuration.discard_unknown_keys:
→ 1427 raise get_type_error(input_value, path_to_item, valid_classes,
1428 key_type=key_type)
1429 for valid_class in valid_classes_coercible:

ApiTypeError: Invalid type for variable ‘index_name’. Required value type is str and passed type was Index at [‘index_name’]


pinecone_vectors =
for loopIndex, text in enumerate(texts, start=1):
pinecone_vectors.append((“test-openai-”+str(loopIndex), get_embedding(text), {“text”: text}))