I am using a hosted instance of baserow (based on baserow docker images) that is configured to use Openstack/Swift as S3 storage.
Started with 1.19, I had no problem in baserow usage.
Since upgrade in 1.20.x and now 1.21.x, I can no longer import any file.
- The user interface respond with “File import failed for unknown reason”.
- The log of baserow-wsgi shows a boto3 error:
ERROR 2023-11-05 13:37:32,468 django.request.log_response:224- Internal Server Error: /api/database/tables/database/193/async/
Traceback (most recent call last):
File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/baserow/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/baserow/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/lib/python3.9/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/baserow/backend/src/baserow/api/decorators.py", line 107, in func_wrapper
return func(*args, **kwargs)
File "/baserow/backend/src/baserow/api/decorators.py", line 232, in func_wrapper
return func(*args, **kwargs)
File "/baserow/backend/src/baserow/contrib/database/api/tables/views.py", line 303, in post
file_import_job = JobHandler().create_and_start_job(
File "/baserow/backend/src/baserow/core/jobs/handler.py", line 169, in create_and_start_job
job_type.after_job_creation(job, kwargs)
File "/baserow/backend/src/baserow/contrib/database/file_import/job_types.py", line 103, in after_job_creation
job.data_file.save(None, data_file)
File "/baserow/venv/lib/python3.9/site-packages/django/db/models/fields/files.py", line 89, in save
self.name = self.storage.save(name, content, max_length=self.field.max_length)
File "/baserow/venv/lib/python3.9/site-packages/django/core/files/storage.py", line 53, in save
name = self.get_available_name(name, max_length=max_length)
File "/baserow/venv/lib/python3.9/site-packages/storages/backends/s3boto3.py", line 599, in get_available_name
return super().get_available_name(name, max_length)
File "/baserow/venv/lib/python3.9/site-packages/django/core/files/storage.py", line 91, in get_available_name
while self.exists(name) or (max_length and len(name) > max_length):
File "/baserow/venv/lib/python3.9/site-packages/storages/backends/s3boto3.py", line 463, in exists
self.connection.meta.client.head_object(Bucket=self.bucket_name, Key=name)
File "/baserow/venv/lib/python3.9/site-packages/botocore/client.py", line 530, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/baserow/venv/lib/python3.9/site-packages/botocore/client.py", line 960, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (400) when calling the HeadObject operation: Bad Request
I am looking for ways to trace boto3 calls to understand what is happening.
The S3 access works for storing images, download tables and so on…
I have already created an issue in the baserow gitlab repo : File import failure when configured to use S3 (#1865) · Issues · Baserow / baserow · GitLab
Thanks in advance for any help…