# KeyError: 'text' issue using AutoTrain Advanced with Mixtral-8X7B-Instruct-v0.1 model

**URL:** <https://discuss.huggingface.co/t/keyerror-text-issue-using-autotrain-advanced-with-mixtral-8x7b-instruct-v0-1-model/67820>\
**Category:** 🤗AutoTrain\
**Created:** [January 3, 2024, 1:35pm UTC](https://discuss.huggingface.co/t/keyerror-text-issue-using-autotrain-advanced-with-mixtral-8x7b-instruct-v0-1-model/67820 "2024-01-03T13:35:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mk09](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mk09](https://discuss.huggingface.co/u/mk09)\
**Post date:** [January 3, 2024, 1:35pm UTC](https://discuss.huggingface.co/t/keyerror-text-issue-using-autotrain-advanced-with-mixtral-8x7b-instruct-v0-1-model/67820/1 "2024-01-03T13:35:09Z")

</div>

I have using the AutoTrain Advanced UI feature for training the `Mixtral-8X7B-Instruct-v0.1` model. I have used JSONL file format for loading my training data. It has format as:

> {“text”: “### Question: … ### Answer: …”}

All looks good but still, I am facing the following error on the console:

```auto
INFO: 10.16.20.172:52953 - "POST /create_project HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
  File "/app/env/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3791, in get_loc
    return self._engine.get_loc(casted_key)
  File "index.pyx", line 152, in pandas._libs.index.IndexEngine.get_loc
  File "index.pyx", line 181, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'text'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/env/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
    result = await app( # type: ignore[func-returns-value]
  File "/app/env/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/app/env/lib/python3.10/site-packages/fastapi/applications.py", line 1106, in __call__
    await super(). __call__ (scope, receive, send)
  File "/app/env/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/app/env/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/app/env/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/app/env/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/app/env/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/app/env/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/app/env/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/app/env/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/app/env/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/app/env/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/app/env/lib/python3.10/site-packages/fastapi/routing.py", line 274, in app
    raw_response = await run_endpoint_function(
  File "/app/env/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
  File "/app/src/autotrain/app.py", line 414, in handle_form
    data_path = dset.prepare()
  File "/app/src/autotrain/dataset.py", line 324, in prepare
    return preprocessor.prepare()
  File "/app/src/autotrain/preprocessor/text.py", line 204, in prepare
    train_df, valid_df = self.prepare_columns(train_df, valid_df)
  File "/app/src/autotrain/preprocessor/text.py", line 186, in prepare_columns
    train_df.loc[:, "autotrain_text"] = train_df[self.text_column]
  File "/app/env/lib/python3.10/site-packages/pandas/core/frame.py", line 3893, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/app/env/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3798, in get_loc
    raise KeyError(key) from err
KeyError: 'text'

```

I am using these settings:

 ![Screenshot 2024-01-03 at 6.55.31 PM](https://us1.discourse-cdn.com/hellohellohello/original/3X/7/d/7db6520b29ef02f9aabf24bda191aa038f2f4f91.png)

I have tried multiple points but have not been able to find the solution.

Thanks in advance!!

---

<div class="post-metadata">

**Author:** ![abhishek](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abhishek/32/32360_2.png) [@abhishek](https://discuss.huggingface.co/u/abhishek)\
**Post date:** [January 3, 2024, 3:40pm UTC](https://discuss.huggingface.co/t/keyerror-text-issue-using-autotrain-advanced-with-mixtral-8x7b-instruct-v0-1-model/67820/2 "2024-01-03T15:40:04Z")

</div>

you need to use csv. jsonl is not supported. [AutoTrain](http://hf.co/docs/autotrain)

---

<div class="post-metadata">

**Author:** ![mk09](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mk09](https://discuss.huggingface.co/u/mk09)\
**Post date:** [January 3, 2024, 4:12pm UTC](https://discuss.huggingface.co/t/keyerror-text-issue-using-autotrain-advanced-with-mixtral-8x7b-instruct-v0-1-model/67820/3 "2024-01-03T16:12:43Z")

</div>

Thank you!! I think now it’s working with CSV format. Thanks again for your prompt response.
