# Im following the in Quickstart but getting unmarshal response body error invalid number literal

**URL:** <https://forum.weaviate.io/t/im-following-the-in-quickstart-but-getting-unmarshal-response-body-error-invalid-number-literal/1162>\
**Category:** Support\
**Created:** [January 1, 2024, 1:54pm UTC](https://forum.weaviate.io/t/im-following-the-in-quickstart-but-getting-unmarshal-response-body-error-invalid-number-literal/1162 "2024-01-01T13:54:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Throw\_Away](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/throw_away/32/631_2.png) [@Throw\_Away](https://forum.weaviate.io/u/Throw_Away)\
**Post date:** [January 1, 2024, 1:54pm UTC](https://forum.weaviate.io/t/im-following-the-in-quickstart-but-getting-unmarshal-response-body-error-invalid-number-literal/1162/1 "2024-01-01T13:54:38Z")

</div>

Below is the error i get when i run the code mentioned in the quickStart page of weaviate website, im a beginner when it comes to these thing please help me figure out the issue

```auto
$ python ingest.py # running the python file
importing question: 1
importing question: 2
importing question: 3
importing question: 4
importing question: 5
importing question: 6
importing question: 7
importing question: 8
importing question: 9
importing question: 10
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}
{'error': [{'message': 'update vector: unmarshal response body: json: invalid number literal, trying to unmarshal "\\"insufficient_quota\\"" into Number'}]}

```

this is my code which im following from quickstart page of weaviate website, i have modified the API keys also the json link mentioned in quickstart, that link does not work so i have updated it, please let me know if im missing something  
‘[https://raw.githubusercontent.com/weaviate-tutorials/quickstart/main/data/jeopardy\_tiny.json](https://raw.githubusercontent.com/weaviate-tutorials/quickstart/main/data/jeopardy_tiny.json)’ this link doesnt work it gives a connection timed out error, i have replaced it with “[https://githubraw.com/weaviate/weaviate-examples/main/jeopardy\_small\_dataset/jeopardy\_tiny.json](https://githubraw.com/weaviate/weaviate-examples/main/jeopardy_small_dataset/jeopardy_tiny.json)”

```auto
import weaviate
import json
import requests
import json

client = weaviate.Client(
    url = "https://some-endpoint.weaviate.network",  
    auth_client_secret=weaviate.AuthApiKey(api_key=""), instance API key
    additional_headers = {
        "X-OpenAI-Api-Key": ""  
    }
)

# ===== define collection =====
class_obj = {
    "class": "Question",
    "vectorizer": "text2vec-openai",
    "moduleConfig": {
        "text2vec-openai": {},
        "generative-openai": {} 
    }
}

client.schema.create_class(class_obj)

# ===== import data =====
resp = requests.get()
data = json.loads(resp.text) 

client.batch.configure(batch_size=100)
with client.batch as batch:
    for i, d in enumerate(data):
        print(f"importing question: {i+1}")
        properties = {
            "answer": d["Answer"],
            "question": d["Question"],
            "category": d["Category"],
        }
        batch.add_data_object(
            data_object=properties,
            class_name="Question"
        )

```

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [January 1, 2024, 3:33pm UTC](https://forum.weaviate.io/t/im-following-the-in-quickstart-but-getting-unmarshal-response-body-error-invalid-number-literal/1162/2 "2024-01-01T15:33:43Z")

</div>

Hi @Throw_Away ! Welcome to our community 🙂

This error is because your API KEY have a quota limitation.

You will need to check with OPENAI and get an API KEY with a bigger quota.

Let me know if that helps 🙂

---

<div class="post-metadata">

**Author:** ![Gautam\_Priya](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/gautam_priya/32/831_2.png) [@Gautam\_Priya](https://forum.weaviate.io/u/Gautam_Priya)\
**Post date:** [January 15, 2024, 9:03am UTC](https://forum.weaviate.io/t/im-following-the-in-quickstart-but-getting-unmarshal-response-body-error-invalid-number-literal/1162/3 "2024-01-15T09:03:06Z")

</div>

Hi Weaviate,

I am having the same issue. If you say that this is an issue with my openai api key quotas, then sure, although I dont understand how … it would be good to know the details.

The openai account I am using is a few months old and openai usage section informs me that I have used up all of my trial credits - most of them having been expired by openai w/o me ever using them.

Given this, I am wondering if there is a way to set this up a free service like bard, something on huggingface or using a llm running locally?

Thanks for your attention.

---

<div class="post-metadata">

**Author:** ![Throw\_Away](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/throw_away/32/631_2.png) [@Throw\_Away](https://forum.weaviate.io/u/Throw_Away)\
**Post date:** [January 15, 2024, 9:58am UTC](https://forum.weaviate.io/t/im-following-the-in-quickstart-but-getting-unmarshal-response-body-error-invalid-number-literal/1162/4 "2024-01-15T09:58:29Z")

</div>

To resolve the issue in my case, i set up a azure openAI resource with standard tier and updated the code

```auto
from unstructured.partition.pdf import partition_pdf
from pathlib import Path
import weaviate
import os

client = weaviate.Client(
    url="https://<WEAVIATE_CLIENT>.weaviate.network",
    auth_client_secret=weaviate.AuthApiKey(
        api_key="" #auth key
    ),
    additional_headers={
        "X-Azure-Api-Key": "",
        # "X-OpenAI-Api-Key": "" # if using openAI key
    },
)

client.schema.delete_all()

schema = {
    "class": "Document",
    "vectorizer": "text2vec-openai",
    "properties": [
        {
            "name": "source",
            "dataType": ["text"],
        },
        {
            "name": "abstract",
            "dataType": ["text"],
            "moduleConfig": {
                "text2vec-openai": {"skip": False, "vectorizePropertyName": False}
            },
        },
    ],
    "moduleConfig": {
        "text2vec-openai": {
            "baseURL": "https://<RESOURCE_NAME>.openai.azure.com/",
            "resourceName": "<RESOURCE_NAME>",
            "deploymentId": "<DEPLOYMENT_NAME>",
        },
        "generative-openai": {
            "model": "gpt-3.5-turbo",
            "baseURL": "https://<RESOURCE_NAME>.openai.azure.com/",
            "resourceName": "<RESOURCE_NAME>",
            "deploymentId": "<DEPLOYMENT_NAME>",
        },
    },
}

client.schema.create_class(schema)

data_folder = "data" #folder path which contains all documents

data_objects = []

for path in Path(data_folder).iterdir():
    print(path)
    if path.suffix != ".pdf":
        continue

    print(f"Processing {path.name}...")

    elements = partition_pdf(filename=path)

    abstract_extractor = AbstractExtractor()
    abstract_extractor.consume_elements(elements)

    data_object = {"source": path.name, "abstract": abstract_extractor.abstract()}

    data_objects.append(data_object)

client.batch.configure(batch_size=100) # Configure batch
with client.batch as batch:
    for data_object in data_objects:
        batch.add_data_object(data_object, "Document")

```

when i ran this script i was able to upload document to weaviateDB, the issue was because i didn’t have enough tokens to create embedding.
