Airtable Import not working?

I did a fresh local install of 1.9.1 via docker using the instructions in the docs. I’m using the standard docker image with no external db (just locally testing)

I’ve been unable to get the Airtable import to work, so I created a simple Airtable base with one row and it doesn’t work either. The UI just says “Something went wrong”

Here’s the base Airtable - Untitled Base

Hello @geoffatsource, first of all, welcome to the community!

The Airtable import is currently a bit limited: it’s in the Beta stage and the functionality is less stable, some imports may not work properly. But with all the community feedback, we plan to polish the feature very quickly :muscle:

Regarding your particular case: we were aware of this bug and it’s already fixed in the hosted version on baserow.io. There is a small delay with the self-hosted versions (including Docker one that you’re using), but a big bunch of errors will disappear with the next release which is expected to be next week. We can ping you as soon as new changes are available, so we could test the Airtable import again with you together. What do you think?

You can also follow the progress here: fixed some airtable import bugs (!615) · Merge requests · Bram Wiepjes / baserow · GitLab.

That would be great. Thank you!

Hello @geoffatsource! Good news: we fixed a bunch of Airtable import bugs in Baserow 1.10 and now it should work more smoothly. Make sure to test out this feature in the latest release version :slightly_smiling_face:

I tested a few bases with 1.10 and they worked. Thanks!

1 Like

@olgatrykush
Hello there
I tried to import an Airtable base but got this error:

Something went wrong 
Something went wrong while importing the Airtable base.

The base has around 40k records and around 300 fields
I tried on the hosted version and also on a self hosted container connected to an external postgres server, both failed

Hi @mahmouds12, I’ve looked into the logs and figured out why your Airtable import wasn’t working. Apparently there is one row where the raw date is +20222-03-28T00:00:00.000Z, and that’s an invalid date that can’t be parsed. I’ve fixed the problem by making the parsing more lenient in this merge request Prevent airtable import from crashing when providing an invalid date (!772) · Merge requests · Bram Wiepjes / baserow · GitLab. The downside is that it will take a while before you can use the Airtable import because the code first needs to be released or deployed to baserow.io. Alternatively, you could try to find the row that has date, delete the value and try the import again.

2 Likes

Thanks @bram
I’ve found the error it was a date with year 20222 instead of 2022 inside airtable… it took me a long time to find it.
It would be good if the table name, and field name that has the error are displayed in the error message or in the logs.
That way it could save hours or days of searching for the issue.

Thanks for your help, I appreciate it :slight_smile:

I faced another issue today… in the logs it shows:

 [EXPORT_WORKER][2022-05-26 23:22:01]   File "/baserow/venv/lib/python3.7/site-packages/PIL/Image.py", line 1125, in copy  
 [EXPORT_WORKER][2022-05-26 23:22:01]     self.load()  
 [EXPORT_WORKER][2022-05-26 23:22:01]   File "/baserow/venv/lib/python3.7/site-packages/PIL/ImageFile.py", line 248, in load  
 [EXPORT_WORKER][2022-05-26 23:22:01]     "image file is truncated "  
 [BACKEND][2022-05-26 23:22:01] 197.47.89.69:0 - "GET /api/database/airtable/import-job/35/ HTTP/1.1" 200  
 [EXPORT_WORKER][2022-05-26 23:22:02] OSError: image file is truncated (0 bytes not processed) ```

My 2 cents…

That the imagefile is truncated should mean that it was damaged during uploading as far as I know. So did you try it again?

I am no python programmer :crazy_face: but i found a number of the same errors online. Most of them point to the following that has to be added to the code to handle truncated images.

It has to do with the Python Imaging Library (PIL)

from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
1 Like

Thanks
I was able to find the image that caused the issue, and removed it from Airtable.
I will share it here so that someone from baserow team can test and try to know the reason for this error.

you can test with this airtable share url : Airtable - Product catalog
it has a row called “test” in “Furniture” table, field “images” with attachment name: “13DF0633-4835-45B4-B652-A987A17830BA.jpeg”
this is the image that is causing the error

here’s the full log for reference:

[bce60cd8-8243-4d4a-90af-2a4f3d14e800] raised unexpected: OSError('image file is truncated (0 bytes not processed)')  
 [EXPORT_WORKER][2022-05-28 08:48:24] Traceback (most recent call last):  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/venv/lib/python3.7/site-packages/celery/app/trace.py", line 451, in trace_task  
 [EXPORT_WORKER][2022-05-28 08:48:24]     R = retval = fun(*args, **kwargs)  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/venv/lib/python3.7/site-packages/celery/app/trace.py", line 734, in __protected_call__  
 [EXPORT_WORKER][2022-05-28 08:48:24]     return self.run(*args, **kwargs)  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/backend/src/baserow/contrib/database/airtable/tasks.py", line 131, in run_import_from_airtable  
 [EXPORT_WORKER][2022-05-28 08:48:24]     raise e  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/backend/src/baserow/contrib/database/airtable/tasks.py", line 90, in run_import_from_airtable  
 [EXPORT_WORKER][2022-05-28 08:48:24]     **kwargs  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/backend/src/baserow/contrib/database/airtable/handler.py", line 625, in import_from_airtable_to_group  
 [EXPORT_WORKER][2022-05-28 08:48:24]     progress_builder=progress.create_child_builder(represents_progress=600),  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/backend/src/baserow/core/handler.py", line 867, in import_applications_to_group  
 [EXPORT_WORKER][2022-05-28 08:48:24]     represents_progress=1000  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/backend/src/baserow/contrib/database/application_types.py", line 287, in import_serialized  
 [EXPORT_WORKER][2022-05-28 08:48:24]     storage,  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/backend/src/baserow/contrib/database/fields/field_types.py", line 1782, in set_import_serialized_value  
 [EXPORT_WORKER][2022-05-28 08:48:24]     None, file["original_name"], stream, storage=storage  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/backend/src/baserow/core/user_files/handler.py", line 250, in upload_user_file  
 [EXPORT_WORKER][2022-05-28 08:48:24]     self.generate_and_save_image_thumbnails(image, user_file, storage=storage)  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/backend/src/baserow/core/user_files/handler.py", line 162, in generate_and_save_image_thumbnails  
 [EXPORT_WORKER][2022-05-28 08:48:24]     thumbnail = ImageOps.fit(image.copy(), size_copy, Image.ANTIALIAS)  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/venv/lib/python3.7/site-packages/PIL/Image.py", line 1125, in copy  
 [EXPORT_WORKER][2022-05-28 08:48:24]     self.load()  
 [EXPORT_WORKER][2022-05-28 08:48:24]   File "/baserow/venv/lib/python3.7/site-packages/PIL/ImageFile.py", line 248, in load  
 [EXPORT_WORKER][2022-05-28 08:48:24]     "image file is truncated "  

This is not working since last few days. I am not able to import Airtable databse.

Hello @pratik! The Airtbale import works for me, can you please share more details on your case?

1 Like

Hi,

Thank you for the response. It was not working last couple of days. Surprisingly, its working now. Thanks

I got same problem with new version self host baserow 1.13.3

Can’t import AirTable base. But if I use baserow.io hosted version, saame Airtables base import correctly.

But in self-host version in 42% importing I see that error

I have the same issue with self-hosted (using Docker) version 1.14.0.

Something went wrong
Something went wrong during the airtable job execution.

Correction: it just worked.

1 Like

For future readers, this issue was resolved in this thread: Self Hosted. Can't import Airtable base.