Cannot get upsert to work no matter what I am trying

No matter what I am trying on my flask server, I cannot get an upsert to work. I even stopped using the document I was trying with, and have switched over to just the sample from pinecone. That works on the website itself, but not when I try via the sdk. Any help is appreciated, I am going nuts here.

sample_doc = {
    "vectors": [
            "id": "item_0",
            "metadata": {
                "category": "sports",
                "colors": [
                "time_stamp": 0
            "values": [
    "namespace": "example_namespace"

# Upsert the vector into the Pinecone index
index = pinecone.Index(index_name)

ValueError: Invalid vector value passed: cannot interpret type <class ‘list’>

Note that I have tried every possible variation on this, i’ve tried index.upsert(sample_doc), etc.

Hi thanks for reaching out! We think we have found a bug in the client and are working to resolve. If you are blocked please consider using our tuple based upserts.

upsert_response = index.upsert(
        ("vec1", [0.1, 0.2, 0.3], {"genre": "drama"}),
        ("vec2", [0.2, 0.3, 0.4], {"genre": "action"}),

We’ll update as soon as we have a solution. Thank you!

I couldn’t get it to work either so I switched to using the requests python library with POST statements and it worked great. I’m not using the python library anymore.

request_data = {'vectors': [
                    {'id': str(record_id), 'values': embed_list}

request_url = ""
response =,
                                 'Api-Key': 'xyzzy',
                                 'accept': 'application/json',
                                 'content-type': 'application/json'

if response.status_code == 200:
   # good to go

We have fixed the issue with passing dictionaries to upsert in version 2.2.1 of the client.