# Self-hosted Airtable Import KeyError(18)

**URL:** https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650
**Category:** Technical Help
**Tags:** airtable, docker, self-hosting
**Created:** [April 19, 2023, 7:14pm UTC](https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650 "2023-04-19T19:14:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Manny](https://community.baserow.io/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@Manny](https://community.baserow.io/u/Manny)
#### Post date: [April 19, 2023, 7:14pm UTC](https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650/1 "2023-04-19T19:14:24Z")

</div>

## Technical Help Questionnaire

Have you read and followed the instructions at: [\*READ ME FIRST\* Technical Help FAQs - #2 by nigel](https://community.baserow.io/t/read-me-first-technical-help-faqs/17/2) ?

**Answer:** Sure did.

### Self-Hosted Installation and Setup Questions

#### How have you self-hosted Baserow.

Docker Compose

```auto
services:
  baserow:
    container_name: baserow
    image: baserow/baserow:latest
    environment:
      BASEROW_PUBLIC_URL: 'https://MY_URL'
      WEB_FRONTEND_PORT: 3333
      WEB_FRONTEND_SSL_PORT: 3334
    ports:
      - "3333:80"
      - "3334:443"
    volumes:
      - baserow_data:/baserow/data
volumes:
  baserow_data:

```

#### Which version of Baserow are you using.

1.16.0

### Describe the problem

I’m unable to import any Airtable bases into my self-hosted Baserow instance. The same bases import just fine to an account on [baserow.io](http://baserow.io), but not my local version. The import process crashes at 42% and I just get the “Something went wrong” message. Logs below.

The bases in question are ~2,500 rows, ~5 tables, ~20 columns so nothing very large.

#### Please attach full logs from all of Baserow’s services

```auto
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] [2023-04-19 19:12:34,063: INFO/MainProcess] Task baserow.core.jobs.tasks.run_async_job[e303c9d5-faf7-478b-bf62-aedf29a4109d] received
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] [2023-04-19 19:12:42,131: ERROR/ForkPoolWorker-1] Task baserow.core.jobs.tasks.run_async_job[e303c9d5-faf7-478b-bf62-aedf29a4109d] raised unexpected: KeyError(18)
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] Traceback (most recent call last):
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/venv/lib/python3.9/site-packages/celery/app/trace.py", line 451, in trace_task
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] R = retval = fun(*args, **kwargs)
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/venv/lib/python3.9/site-packages/celery/app/trace.py", line 734, in __protected_call__
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] return self.run(*args, **kwargs)
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/core/jobs/tasks.py", line 34, in run_async_job
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] JobHandler().run(job)
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/core/jobs/handler.py", line 59, in run
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] return job_type.run(job, progress)
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/contrib/database/airtable/job_types.py", line 116, in run
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] database = action_type_registry.get(
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/contrib/database/airtable/actions.py", line 55, in do
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] database = AirtableHandler.import_from_airtable_to_workspace(
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/contrib/database/airtable/handler.py", line 596, in import_from_airtable_to_workspace
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] databases, _ = CoreHandler().import_applications_to_workspace(
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/core/telemetry/utils.py", line 37, in _wrapper
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] raise ex
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/core/telemetry/utils.py", line 33, in _wrapper
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] result = wrapped_func(*args, **kwargs)
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/core/handler.py", line 1550, in import_applications_to_workspace
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] imported_application = application_type.import_serialized(
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/contrib/database/application_types.py", line 459, in import_serialized
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] self.import_tables_serialized(
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/contrib/database/application_types.py", line 303, in import_tables_serialized
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] view_type.import_serialized(
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/contrib/database/views/view_types.py", line 132, in import_serialized
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] grid_view = super().import_serialized(
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/backend/src/baserow/contrib/database/views/registries.py", line 390, in import_serialized
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] value_provider_type.set_import_serialized_value(
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] File "/baserow/premium/backend/src/baserow_premium/views/decorator_value_provider_types.py", line 133, in set_import_serialized_value
baserow | [EXPORT_WORKER][2023-04-19 19:12:42] new_field_id = id_mapping["database_fields"][filter["field"]]

```

---

<div class="post-metadata">

### Author: ![bram](https://community.baserow.io/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bram](https://community.baserow.io/u/bram)
#### Post date: [May 10, 2023, 10:45am UTC](https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650/2 "2023-05-10T10:45:24Z")

</div>

Hi @Manny, firstly, my apologies for the delayed response. It’s strange that the imports work fine on [baserow.io](http://baserow.io), but not in your local environment. I’ve double-checked, and we haven’t introduced changes to the Airtable import on [baserow.io](http://baserow.io) since the release of 1.16. Is it a possibility that you share the publicly shared Airtable base with so that I can try to reproduce the problem myself? This will give me more insights in what’s going wrong.

---

<div class="post-metadata">

### Author: ![Manny](https://community.baserow.io/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@Manny](https://community.baserow.io/u/Manny)
#### Post date: [May 10, 2023, 11:02pm UTC](https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650/3 "2023-05-10T23:02:55Z")

</div>

Sure thing. Here’s a link to one of the bases. I just re-tested it to make sure I got the same error and it didn’t stop making that strange noise as soon as I got to the mechanic’s.

> **[Airtable | Everyone's app platform](https://airtable.com/shrwQSrPVpyM05hXx)**
>
> Airtable is a low-code platform for building collaborative apps. Customize your workflow, collaborate, and achieve ambitious outcomes. Get started for free.

I’ve also restarted the Docker container, as well as the machine itself a few times to no avail.

---

<div class="post-metadata">

### Author: ![bram](https://community.baserow.io/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bram](https://community.baserow.io/u/bram)
#### Post date: [May 12, 2023, 8:30am UTC](https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650/4 "2023-05-12T08:30:44Z")

</div>

Hi @Manny, thank you for sharing your base. The good news is that I’ve been able to reproduce your problem. This somehow only seems to happen if you run the Docker all-in-one image. If you run the normal development environment, even on version 1.16.0, it does work as expected. We’re going to look into this.

---

<div class="post-metadata">

### Author: ![bram](https://community.baserow.io/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bram](https://community.baserow.io/u/bram)
#### Post date: [May 12, 2023, 9:23am UTC](https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650/5 "2023-05-12T09:23:54Z")

</div>

After some debugging, we learned that it’s related to a bug in our code. We’ve already fixed it ([Fix wrong empty grid view during airtable import bug (!1413) · Merge requests · Baserow / baserow · GitLab](https://gitlab.com/baserow/baserow/-/merge_requests/1413)), and it will be released in version 1.17 upcoming Tuesday, May 16. I’m sorry about the inconvenience.

---

<div class="post-metadata">

### Author: ![Manny](https://community.baserow.io/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@Manny](https://community.baserow.io/u/Manny)
#### Post date: [May 12, 2023, 2:01pm UTC](https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650/6 "2023-05-12T14:01:08Z")

</div>

Oh, awesome! Thank you for hunting this down. I’ll look forward to the update.

---

<div class="post-metadata">

### Author: ![Manny](https://community.baserow.io/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@Manny](https://community.baserow.io/u/Manny)
#### Post date: [May 17, 2023, 2:14pm UTC](https://community.baserow.io/t/self-hosted-airtable-import-keyerror-18/2650/7 "2023-05-17T14:14:00Z")

</div>

Just closing the loop here to confirm that this indeed fixed all the issues I was having. Now everything imports perfectly. Thanks again for the fix.
