# When creating a new row, I keep getting 500 internal server error

**URL:** https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615
**Category:** Technical Help
**Created:** [February 27, 2024, 9:26pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615 "2024-02-27T21:26:08Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 27, 2024, 9:26pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/1 "2024-02-27T21:26:08Z")

</div>

Hi support team.  
I have 2 tables named “Clients” and “Services”.  
2 tables are connected via Link field each other.  
When I create a new row via api, sometimes, I get 500 internal server error.  
Here is an error log below.  
It says “field\_4886” has no field, BUT!! I have field\_4886 field named “Services” in the Clients table.  
I am not able to create new rows correctly by this kind of error.  
Meaning, I can not trust the data correction.  
This is a really super ultra-critical problem.  
Please help me.  
Thanks.

```auto
[BACKEND][2024-02-27 21:15:19] 49.13.137.191:0 - "POST /api/database/rows/table/524/?user_field_names=true HTTP/1.1" 200
 [BACKEND][2024-02-27 21:15:19] 407|2024-02-27 21:15:19.379|ERROR|baserow.core.formula.exceptions:formula_exception_handler:24 - Formula related error occurred: Table521Model_field_4886 has no field named 'None'. Please send this error to the baserow developers at https://baserow.io/contact.
 [BACKEND][2024-02-27 21:15:19] 407|2024-02-27 21:15:19.393|INFO|baserow.core.action.signals:log_action_receiver:28 - do: workspace=96 action_type=delete_row user=2
 [BACKEND][2024-02-27 21:15:19] 407|2024-02-27 21:15:19.379|ERROR|baserow.core.formula.exceptions:formula_exception_handler:28 - Table521Model_field_4886 has no field named 'None'

```

I had similar problem yesterday , so I deleted Lookup fields from tables and retried, so it worked.  
I need to use Link fields absolutely, of course I need Lookup fields.  
But if I add Link and Lookup fields, then get tons of errors immediately when I create new rows via api.  
I am confused and spending a lot of time with this kind of issue.  
Here is another error. But all fields exist correctly.

```auto
[BACKEND][2024-02-27 21:28:10] django.core.exceptions.FieldDoesNotExist: Table521Model_field_4885 has no field named 'None'
 [BACKEND][2024-02-27 21:28:10] ERROR 2024-02-27 21:28:10,441 django.request.log_response:241- Internal Server Error: /api/database/rows/table/523/53401/
 [BACKEND][2024-02-27 21:28:10] Traceback (most recent call last):
 [BACKEND][2024-02-27 21:28:10] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/options.py", line 669, in get_field
 [BACKEND][2024-02-27 21:28:10] return self.fields_map[field_name]

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 27, 2024, 9:36pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/2 "2024-02-27T21:36:03Z")

</div>

Here is another error.

```auto
 [BACKEND][2024-02-27 21:34:46] 407|2024-02-27 21:34:46.274|ERROR|baserow.core.formula.exceptions:formula_exception_handler:24 - Formula related error occurred: Cannot resolve keyword 'field_4902' into field. Join on 'not_trashed_field_4884' not permitted.. Please send this error to the baserow developers at https://baserow.io/contact.
 [BACKEND][2024-02-27 21:34:46] 407|2024-02-27 21:34:46.274|ERROR|baserow.core.formula.exceptions:formula_exception_handler:28 - Cannot resolve keyword 'field_4902' into field. Join on 'not_trashed_field_4884' not permitted.

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 27, 2024, 9:39pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/4 "2024-02-27T21:39:39Z")

</div>

![image](https://community.baserow.io/uploads/default/original/2X/4/46b8a9e7f3bd00cdb97163e5529346456636a5a7.png)

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 27, 2024, 9:40pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/5 "2024-02-27T21:40:12Z")

</div>

Support team, please help me.

---

<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: [February 28, 2024, 8:41am UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/6 "2024-02-28T08:41:34Z")

</div>

Hi @Long, I’d love to help you with your super ultra-critical problem. Did you see my question in this thread [Field value is not updating real-time automatically via link field between 2 tables - #12 by Long](https://community.baserow.io/t/field-value-is-not-updating-real-time-automatically-via-link-field-between-2-tables/4537/12)?

It would be great if you can share as many details of how your database schema looks like. Because you’re self-hosting, we would need to be able to reproduce the problem ourselves in our order to figure out what’s going wrong.

How are you currently self-hosting (Docker, Cloudron, etc?), and which environment variables have you set?

Can you reproduce the problem on [https://baserow.io](https://baserow.io)? If so, then we can dive into the exact problem.

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 9:43am UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/7 "2024-02-28T09:43:03Z")

</div>

Okay, let’s talk in this thread.

1. How are you currently self-hosting (Docker, Cloudron, etc?), and which environment variables have you set?

I installed it with Docker.

 ![image](https://community.baserow.io/uploads/default/original/2X/d/d14b2606e788f6b3a6e8c0d7e5d4f0deec4067fd.png)

Regarding my problem, I saw a post yesterday in baserow community.  
A guy said, he had a problem with the link field, so to resolve this problem, he removed all tables and recreated tables and fields from scratch, so finally he got it working.

So, I am trying to recreate tables and fields from scratch like him.  
I haven’t created tables and fields from scratch at the beginning.  
I have tables with a lot of records in airtable.  
I wanted to import them from airtable to baserow, so I imported data using “Import from airtable” option in baserow panel.  
But after moving, I realized, the data moved was wrong, so I decided to move data using baserow api and created my script to move data.  
Once I built my script, I removed all rows from tables using baserow api, but I just kept tables and structures(fields).  
I have exact same tables and fields like airtbale.

After that, I ran my script, but sometimes, I got 500 internal server error, so I googled why. I found the post in baserow community, he said, he has deleted lookup fields , so it worked.  
So, I deleted lookup fields from tables like him.  
But sometimes, I got another 500 internal server error related to link field. I shared my logs above already.  
As I explained above, I have correct fields like airtable, but keep getting errors.  
I am confused and not sure how to resolve this problem.

Please let me know your thoughts, thanks.

---

<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: [February 28, 2024, 12:22pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/8 "2024-02-28T12:22:00Z")

</div>

A couple of questions:

- What are the specifications of your server (CPU, RAM, etc)?
- Which environment variables have you set? You are welcome to omit the ones that hold passwords.
- How many API requests are making?
- Does your script use the Baserow API to move the data from Airtable into Baserow?
- Do you have more output logs whenever you’re getting the 500 errors? In your previous message, you only added a couple of lines. The more you can share, the better.

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 1:01pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/9 "2024-02-28T13:01:31Z")

</div>

- What are the specifications of your server (CPU, RAM, etc)?  
CPU: 8 core  
RAM: 15.2G  

- Which environment variables have you set? You are welcome to omit the ones that hold passwords.  
When I installed with docker, email SMTP was not working, so I ran this with my parameters such as domain, credentials etc.  
I am feeling this is public thread, so I am afraid to share my server credential here, right?

```auto
docker run \
  -d \
  --name baserow \
  -e BASEROW_PUBLIC_URL=https://www.yourdomain.com \
  -e EMAIL_SMTP=True \
  -e EMAIL_SMTP_HOST=TODO \
  -e EMAIL_SMTP_PORT=TODO \
  -e EMAIL_SMTP_USER=TODO \
  -e EMAIL_SMTP_PASSWORD=TODO \
  -e EMAIL_SMTP_USE_TLS= \
  -v baserow_data:/baserow/data \
  -p 80:80 \
  -p 443:443 \
  --restart unless-stopped \
  baserow/baserow:1.22.3

```

- How many API requests are making?  
I built a script using Laravel and job queue.  
[Queues - Laravel 10.x - The PHP Framework For Web Artisans](https://laravel.com/docs/10.x/queues#defining-batchable-jobs)

Not sure how many. But if there are 5000 records in airtable, I create 5000 jobs with a queue and run it individually.

- Does your script use the Baserow API to move the data from Airtable into Baserow?  
Yes, my script uses the Baserow API to move the data from Airtable to Baserow.

- Do you have more output logs whenever you’re getting 500 errors? In your previous message, you only added a couple of lines. The more you can share, the better.  
Not sure how to check logs entirely, but I can’t see errors right now.  
Please guide me on how to copy entire logs.

Thank you.

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 1:09pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/10 "2024-02-28T13:09:16Z")

</div>

Oh error here

```auto
 [BACKEND][2024-02-28 13:07:48] 406|2024-02-28 13:07:48.901|ERROR|baserow.core.formula.exceptions:formula_exception_handler:24 - Formula related error occurred: Cannot resolve keyword 'field_4902' into field. Join on 'not_trashed_field_4884' not permitted.. Please send this error to the baserow developers at https://baserow.io/contact.
 [BACKEND][2024-02-28 13:07:48] 406|2024-02-28 13:07:48.901|ERROR|baserow.core.formula.exceptions:formula_exception_handler:28 - Cannot resolve keyword 'field_4902' into field. Join on 'not_trashed_field_4884' not permitted.
 [BACKEND][2024-02-28 13:07:48] Traceback (most recent call last):
 [BACKEND][2024-02-28 13:07:48]
 [BACKEND][2024-02-28 13:07:48] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1831, in transform
 [BACKEND][2024-02-28 13:07:48] return self.try_transform(wrapped, name)
 [BACKEND][2024-02-28 13:07:48] │ │ │ └ 'field_4902'
 [BACKEND][2024-02-28 13:07:48] │ │ └ Col(database_table_521, database_table.Table521Model.field_4884)
 [BACKEND][2024-02-28 13:07:48] │ └ <function Query.try_transform at 0x7fc0e0c9df70>
 [BACKEND][2024-02-28 13:07:48] └ <django.db.models.sql.query.Query object at 0x7fc0ab70bb80>
 [BACKEND][2024-02-28 13:07:48] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1341, in try_transform
 [BACKEND][2024-02-28 13:07:48] raise FieldError(
 [BACKEND][2024-02-28 13:07:48] └ <class 'django.core.exceptions.FieldError'>
 [BACKEND][2024-02-28 13:07:48]
 [BACKEND][2024-02-28 13:07:48] django.core.exceptions.FieldError: Unsupported lookup 'field_4902' for ManyToManyField or join on the field not permitted.

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 1:10pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/11 "2024-02-28T13:10:03Z")

</div>

I am running my script to check errors.  
Here is another one.

```auto
 [BACKEND][2024-02-28 13:09:13] django.core.exceptions.FieldDoesNotExist: Table524Model_field_4957 has no field named 'None'
 [BACKEND][2024-02-28 13:09:13] 406|2024-02-28 13:09:13.396|ERROR|baserow.core.formula.exceptions:formula_exception_handler:24 - Formula related error occurred: Cannot resolve keyword 'field_4902' into field. Join on 'not_trashed_field_4884' not permitted.. Please send this error to the baserow developers at https://baserow.io/contact.
 [BACKEND][2024-02-28 13:09:13] 406|2024-02-28 13:09:13.396|ERROR|baserow.core.formula.exceptions:formula_exception_handler:28 - Cannot resolve keyword 'field_4902' into field. Join on 'not_trashed_field_4884' not permitted.
 [BACKEND][2024-02-28 13:09:13] Traceback (most recent call last):
 [BACKEND][2024-02-28 13:09:13]
 [BACKEND][2024-02-28 13:09:13] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1831, in transform
 [BACKEND][2024-02-28 13:09:13] return self.try_transform(wrapped, name)
 [BACKEND][2024-02-28 13:09:13] │ │ │ └ 'field_4902'
 [BACKEND][2024-02-28 13:09:13] │ │ └ Col(database_table_521, database_table.Table521Model.field_4884)
 [BACKEND][2024-02-28 13:09:13] │ └ <function Query.try_transform at 0x7fc0e0c9df70>
 [BACKEND][2024-02-28 13:09:13] └ <django.db.models.sql.query.Query object at 0x7fc0abb92f10>

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 1:10pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/12 "2024-02-28T13:10:41Z")

</div>

```auto
 [BACKEND][2024-02-28 13:10:11] django.core.exceptions.FieldError: Cannot resolve keyword 'field_4932' into field. Join on 'not_trashed_field_4886' not permitted.
 [BACKEND][2024-02-28 13:10:11] 49.13.137.191:0 - "DELETE /api/database/rows/table/524/13060/ HTTP/1.1" 500
 [BACKEND][2024-02-28 13:10:11] ERROR 2024-02-28 13:10:11,159 django.request.log_response:241- Internal Server Error: /api/database/rows/table/524/13062/
 [BACKEND][2024-02-28 13:10:11] Traceback (most recent call last):
 [BACKEND][2024-02-28 13:10:11] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
 [BACKEND][2024-02-28 13:10:11] raise exc_info[1]
 [BACKEND][2024-02-28 13:10:11] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 43, in inner
 [BACKEND][2024-02-28 13:10:11] response = await get_response(request)
 [BACKEND][2024-02-28 13:10:11] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
 [BACKEND][2024-02-28 13:10:11] response = await wrapped_callback(
 [BACKEND][2024-02-28 13:10:11] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
 [BACKEND][2024-02-28 13:10:11] ret = await asyncio.wait_for(future, timeout=None)
 [BACKEND][2024-02-28 13:10:11] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
 [BACKEND][2024-02-28 13:10:11] return await fut
 [BACKEND][2024-02-28 13:10:11] File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 1:11pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/13 "2024-02-28T13:11:14Z")

</div>

```auto
[EXPORT_WORKER][2024-02-28 13:10:11] [2024-02-28 13:10:11,132: WARNING/ForkPoolWorker-1] 399|2024-02-28 13:10:11.132|INFO|baserow.contrib.database.search.handler:update_tsvector_columns:489 - Updated a unknown number of rows in table 521's tsvs with optional field filter of no fields.
 [BACKEND][2024-02-28 13:10:11] │ └ (<baserow.contrib.database.api.rows.views.RowView object at 0x7fc0aa873cd0>, <rest_framework.request.Request: DELETE '/api/da...
 [BACKEND][2024-02-28 13:10:11] └ <function RowView.delete at 0x7fc0d9e5faf0>
 [BACKEND][2024-02-28 13:10:11]
 [BACKEND][2024-02-28 13:10:11] File "/baserow/backend/src/baserow/contrib/database/api/rows/views.py", line 913, in delete
 [BACKEND][2024-02-28 13:10:11] action_type_registry.get_by_type(DeleteRowActionType).do(
 [BACKEND][2024-02-28 13:10:11] │ │ └ <class 'baserow.contrib.database.rows.actions.DeleteRowActionType'>
 [BACKEND][2024-02-28 13:10:11] │ └ <function Registry.get_by_type at 0x7fc0de648d30>
 [BACKEND][2024-02-28 13:10:11] └ <baserow.core.action.registries.ActionTypeRegistry object at 0x7fc0dd139c10>
 [BACKEND][2024-02-28 13:10:11]
 [BACKEND][2024-02-28 13:10:11] File "/baserow/backend/src/baserow/contrib/database/rows/actions.py", line 322, in do
 [BACKEND][2024-02-28 13:10:11] RowHandler().delete_row_by_id(user, table, row_id, model=model)

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 1:11pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/14 "2024-02-28T13:11:48Z")

</div>

```auto
 [BACKEND][2024-02-28 13:11:15] 406|2024-02-28 13:11:14.972|INFO|baserow.core.action.signals:log_action_receiver:28 - do: workspace=96 action_type=create_row user=2
 [BACKEND][2024-02-28 13:11:15] ERROR 2024-02-28 13:11:15,071 django.request.log_response:241- Internal Server Error: /api/database/rows/table/524/13301/
 [BACKEND][2024-02-28 13:11:15] Traceback (most recent call last):
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/options.py", line 669, in get_field
 [BACKEND][2024-02-28 13:11:15] return self.fields_map[field_name]
 [BACKEND][2024-02-28 13:11:15] KeyError: None
 [BACKEND][2024-02-28 13:11:15]
 [BACKEND][2024-02-28 13:11:15] During handling of the above exception, another exception occurred:
 [BACKEND][2024-02-28 13:11:15]
 [BACKEND][2024-02-28 13:11:15] Traceback (most recent call last):
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
 [BACKEND][2024-02-28 13:11:15] raise exc_info[1]
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 43, in inner
 [BACKEND][2024-02-28 13:11:15] response = await get_response(request)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
 [BACKEND][2024-02-28 13:11:15] response = await wrapped_callback(
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
 [BACKEND][2024-02-28 13:11:15] ret = await asyncio.wait_for(future, timeout=None)
 [BACKEND][2024-02-28 13:11:15] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
 [BACKEND][2024-02-28 13:11:15] return await fut
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
 [BACKEND][2024-02-28 13:11:15] result = self.fn(*self.args, **self.kwargs)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 490, in thread_handler
 [BACKEND][2024-02-28 13:11:15] return func(*args, **kwargs)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 55, in wrapped_view
 [BACKEND][2024-02-28 13:11:15] return view_func(*args, **kwargs)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 103, in view
 [BACKEND][2024-02-28 13:11:15] return self.dispatch(request, *args, **kwargs)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
 [BACKEND][2024-02-28 13:11:15] response = self.handle_exception(exc)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
 [BACKEND][2024-02-28 13:11:15] self.raise_uncaught_exception(exc)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
 [BACKEND][2024-02-28 13:11:15] raise exc
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
 [BACKEND][2024-02-28 13:11:15] response = handler(request, *args, **kwargs)

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 1:12pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/15 "2024-02-28T13:12:19Z")

</div>

```auto
 [BACKEND][2024-02-28 13:11:15] django.core.exceptions.FieldError: Related Field got invalid lookup: id
 [BACKEND][2024-02-28 13:11:15] ERROR 2024-02-28 13:11:15,080 django.request.log_response:241- Internal Server Error: /api/database/rows/table/524/13300/
 [BACKEND][2024-02-28 13:11:15] Traceback (most recent call last):
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
 [BACKEND][2024-02-28 13:11:15] raise exc_info[1]
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 43, in inner
 [BACKEND][2024-02-28 13:11:15] response = await get_response(request)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
 [BACKEND][2024-02-28 13:11:15] response = await wrapped_callback(
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
 [BACKEND][2024-02-28 13:11:15] ret = await asyncio.wait_for(future, timeout=None)
 [BACKEND][2024-02-28 13:11:15] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
 [BACKEND][2024-02-28 13:11:15] return await fut
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
 [BACKEND][2024-02-28 13:11:15] result = self.fn(*self.args, **self.kwargs)
 [BACKEND][2024-02-28 13:11:15] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 490, in thread_handler

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 1:14pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/16 "2024-02-28T13:14:26Z")

</div>

But as I told you above, all tables and fields were imported from Airtable. After imported, I just removed all rows from tables.  
So all tables, fields and structures are very correct.

Sometimes you might see action\_type=delete\_row error in my logs, but please ignore those because I ran delete rows api as well.

Thanks.

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 3:06pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/17 "2024-02-28T15:06:14Z")

</div>

Hi,  
I have Country table in airtable and it has 192 records.  
So, I created Country table and fields fresh from scratch in baserow like airtable, and I tried to move all of them to baserow using baserow api.  
BUT!!!

Only 189 rows were moved, so I traced an error. Meaning, baserow api can’t handle even 192 records.  
This makes me crazy. Please help me asap.

```auto
 [BACKEND][2024-02-28 15:02:06] 407|2024-02-28 15:02:06.673|INFO|baserow.core.action.signals:log_action_receiver:28 - do: workspace=96 action_type=create_row user=2
 [BACKEND][2024-02-28 15:02:06] 407|2024-02-28 15:02:06.694|INFO|baserow.core.action.signals:log_action_receiver:28 - do: workspace=96 action_type=create_row user=2
 [BACKEND][2024-02-28 15:02:06] ERROR 2024-02-28 15:02:06,691 django.request.log_response:241- Internal Server Error: /api/database/rows/table/533/
 [BACKEND][2024-02-28 15:02:06] Traceback (most recent call last):
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/options.py", line 669, in get_field
 [BACKEND][2024-02-28 15:02:06] return self.fields_map[field_name]
 [BACKEND][2024-02-28 15:02:06] KeyError: None
 [BACKEND][2024-02-28 15:02:06]
 [BACKEND][2024-02-28 15:02:06] During handling of the above exception, another exception occurred:
 [BACKEND][2024-02-28 15:02:06]
 [BACKEND][2024-02-28 15:02:06] Traceback (most recent call last):
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
 [BACKEND][2024-02-28 15:02:06] raise exc_info[1]
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 43, in inner
 [BACKEND][2024-02-28 15:02:06] response = await get_response(request)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
 [BACKEND][2024-02-28 15:02:06] response = await wrapped_callback(
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
 [BACKEND][2024-02-28 15:02:06] ret = await asyncio.wait_for(future, timeout=None)
 [BACKEND][2024-02-28 15:02:06] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
 [BACKEND][2024-02-28 15:02:06] return await fut
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
 [BACKEND][2024-02-28 15:02:06] result = self.fn(*self.args, **self.kwargs)

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 3:07pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/18 "2024-02-28T15:07:14Z")

</div>

```auto
 [BACKEND][2024-02-28 15:02:06] During handling of the above exception, another exception occurred:
 [BACKEND][2024-02-28 15:02:06]
 [BACKEND][2024-02-28 15:02:06] Traceback (most recent call last):
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
 [BACKEND][2024-02-28 15:02:06] raise exc_info[1]
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 43, in inner
 [BACKEND][2024-02-28 15:02:06] response = await get_response(request)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
 [BACKEND][2024-02-28 15:02:06] response = await wrapped_callback(
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
 [BACKEND][2024-02-28 15:02:06] ret = await asyncio.wait_for(future, timeout=None)
 [BACKEND][2024-02-28 15:02:06] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
 [BACKEND][2024-02-28 15:02:06] return await fut
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
 [BACKEND][2024-02-28 15:02:06] result = self.fn(*self.args, **self.kwargs)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 490, in thread_handler
 [BACKEND][2024-02-28 15:02:06] return func(*args, **kwargs)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 55, in wrapped_view
 [BACKEND][2024-02-28 15:02:06] return view_func(*args, **kwargs)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 103, in view
 [BACKEND][2024-02-28 15:02:06] return self.dispatch(request, *args, **kwargs)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
 [BACKEND][2024-02-28 15:02:06] response = self.handle_exception(exc)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
 [BACKEND][2024-02-28 15:02:06] self.raise_uncaught_exception(exc)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
 [BACKEND][2024-02-28 15:02:06] raise exc
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
 [BACKEND][2024-02-28 15:02:06] response = handler(request, *args, **kwargs)
 [BACKEND][2024-02-28 15:02:06] File "/usr/lib/python3.9/contextlib.py", line 79, in inner

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 3:07pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/19 "2024-02-28T15:07:42Z")

</div>

```auto
[BACKEND][2024-02-28 15:02:06] return func(*args, **kwds)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/backend/src/baserow/api/decorators.py", line 105, in func_wrapper
 [BACKEND][2024-02-28 15:02:06] return func(*args, **kwargs)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/backend/src/baserow/api/decorators.py", line 170, in func_wrapper
 [BACKEND][2024-02-28 15:02:06] return func(*args, **kwargs)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/backend/src/baserow/contrib/database/api/rows/views.py", line 552, in post
 [BACKEND][2024-02-28 15:02:06] return Response(serializer.data)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/serializers.py", line 555, in data
 [BACKEND][2024-02-28 15:02:06] ret = super().data
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/serializers.py", line 253, in data
 [BACKEND][2024-02-28 15:02:06] self._data = self.to_representation(self.instance)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/serializers.py", line 509, in to_representation
 [BACKEND][2024-02-28 15:02:06] attribute = field.get_attribute(instance)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/fields.py", line 446, in get_attribute
 [BACKEND][2024-02-28 15:02:06] return get_attribute(instance, self.source_attrs)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/fields.py", line 96, in get_attribute
 [BACKEND][2024-02-28 15:02:06] instance = getattr(instance, attr)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/fields/related_descriptors.py", line 588, in __get__
 [BACKEND][2024-02-28 15:02:06] return self.related_manager_cls(instance)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/fields/related_descriptors.py", line 962, in __init__
 [BACKEND][2024-02-28 15:02:06] self.source_field = self.through._meta.get_field(self.source_field_name)
 [BACKEND][2024-02-28 15:02:06] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/options.py", line 671, in get_field
 [BACKEND][2024-02-28 15:02:06] raise FieldDoesNotExist(
 [BACKEND][2024-02-28 15:02:06] django.core.exceptions.FieldDoesNotExist: Table533Model_field_5069 has no field named 'None'
 [BACKEND][2024-02-28 15:02:06] 406|2024-02-28 15:02:06.713|INFO|baserow.core.action.signals:log_action_receiver:28 - do: workspace=96 action_type=create_row user=2
 [BACKEND][2024-02-28 15:02:06] 49.13.137.191:0 - "POST /api/database/rows/table/533/?user_field_names=true HTTP/1.1" 500

```

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 3:11pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/20 "2024-02-28T15:11:30Z")

</div>

Structure is exactly same, I don’t understand why I have to face 500 internal server error for only 192 records moving using baserow api.

 ![image](https://community.baserow.io/uploads/default/original/2X/e/e7b2541a8d443bdad7fadd9749b35543c7fae2f2.png)

---

<div class="post-metadata">

### Author: ![Long](https://community.baserow.io/letter_avatar_proxy/v4/letter/l/e47774/32.png) [@Long](https://community.baserow.io/u/Long)
#### Post date: [February 28, 2024, 3:55pm UTC](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615/21 "2024-02-28T15:55:06Z")

</div>

I deleted all rows from Country table in baserow, and retried to import using baserow api.  
Airtable has 192 records in Country table so now 191 rows were moved and 1 row with 500 error.  
Please help me, this is urgent and super super ULTRA CRITICAL problem for me.  
Thanks.

```auto
 [BACKEND][2024-02-28 15:52:06] 49.13.137.191:0 - "POST /api/database/rows/table/533/?user_field_names=true HTTP/1.1" 200
 [BACKEND][2024-02-28 15:52:06] 405|2024-02-28 15:52:06.077|INFO|baserow.core.action.signals:log_action_receiver:28 - do: workspace=96 action_type=create_row user=2
 [BACKEND][2024-02-28 15:52:06] 406|2024-02-28 15:52:06.079|INFO|baserow.core.action.signals:log_action_receiver:28 - do: workspace=96 action_type=create_row user=2
 [BACKEND][2024-02-28 15:52:06] 406|2024-02-28 15:52:06.083|INFO|baserow.core.action.signals:log_action_receiver:28 - do: workspace=96 action_type=create_row user=2
 [BACKEND][2024-02-28 15:52:06] ERROR 2024-02-28 15:52:06,090 django.request.log_response:241- Internal Server Error: /api/database/rows/table/533/
 [BACKEND][2024-02-28 15:52:06] Traceback (most recent call last):
 [BACKEND][2024-02-28 15:52:06] File "/baserow/venv/lib/python3.9/site-packages/django/db/models/options.py", line 669, in get_field
 [BACKEND][2024-02-28 15:52:06] return self.fields_map[field_name]
 [BACKEND][2024-02-28 15:52:06] KeyError: None
 [BACKEND][2024-02-28 15:52:06]
 [BACKEND][2024-02-28 15:52:06] During handling of the above exception, another exception occurred:
 [BACKEND][2024-02-28 15:52:06]
 [BACKEND][2024-02-28 15:52:06] Traceback (most recent call last):
 [BACKEND][2024-02-28 15:52:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
 [BACKEND][2024-02-28 15:52:06] raise exc_info[1]
 [BACKEND][2024-02-28 15:52:06] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 43, in inner
 [BACKEND][2024-02-28 15:52:06] response = await get_response(request)
 [BACKEND][2024-02-28 15:52:06] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
 [BACKEND][2024-02-28 15:52:06] response = await wrapped_callback(
 [BACKEND][2024-02-28 15:52:06] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
 [BACKEND][2024-02-28 15:52:06] ret = await asyncio.wait_for(future, timeout=None)
 [BACKEND][2024-02-28 15:52:06] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
 [BACKEND][2024-02-28 15:52:06] return await fut

```

[Next page](https://community.baserow.io/t/when-creating-a-new-row-i-keep-getting-500-internal-server-error/4615.md?page=2)
