Hello,
I have a probleme when trying to upload a picture. The probleme occurs from web as well as with API.
Here is the log
[BACKEND][2023-11-13 12:45:47] 127.0.0.1:46652 - "GET /api/_health/ HTTP/1.1" 200
[BACKEND][2023-11-13 12:45:47] ERROR 2023-11-13 12:45:47,974 django.request.log_response:224- Internal Server Error: /api/user-files/upload-file/
[BACKEND][2023-11-13 12:45:47] Traceback (most recent call last):
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
[BACKEND][2023-11-13 12:45:47] raise exc_info[1]
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 38, in inner
[BACKEND][2023-11-13 12:45:47] response = await get_response(request)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 233, in _get_response_async
[BACKEND][2023-11-13 12:45:47] response = await wrapped_callback(request, *callback_args, **callback_kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
[BACKEND][2023-11-13 12:45:47] ret = await asyncio.wait_for(future, timeout=None)
[BACKEND][2023-11-13 12:45:47] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
[BACKEND][2023-11-13 12:45:47] return await fut
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
[BACKEND][2023-11-13 12:45:47] result = self.fn(*self.args, **self.kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 490, in thread_handler
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
[BACKEND][2023-11-13 12:45:47] return view_func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
[BACKEND][2023-11-13 12:45:47] return self.dispatch(request, *args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
[BACKEND][2023-11-13 12:45:47] response = self.handle_exception(exc)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
[BACKEND][2023-11-13 12:45:47] self.raise_uncaught_exception(exc)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
[BACKEND][2023-11-13 12:45:47] raise exc
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
[BACKEND][2023-11-13 12:45:47] response = handler(request, *args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/usr/lib/python3.9/contextlib.py", line 79, in inner
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwds)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/api/decorators.py", line 107, in func_wrapper
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/api/user_files/views.py", line 61, in post
[BACKEND][2023-11-13 12:45:47] user_file = UserFileHandler().upload_user_file(request.user, file.name, file)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/user_files/handler.py", line 252, in upload_user_file
[BACKEND][2023-11-13 12:45:47] self.generate_and_save_image_thumbnails(image, user_file, storage=storage)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/user_files/handler.py", line 168, in generate_and_save_image_thumbnails
[BACKEND][2023-11-13 12:45:47] handler.save(thumbnail_path, thumbnail_stream)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/storage.py", line 9, in save
[BACKEND][2023-11-13 12:45:47] if self.storage.exists(name):
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/storages/backends/s3boto3.py", line 463, in exists
[BACKEND][2023-11-13 12:45:47] self.connection.meta.client.head_object(Bucket=self.bucket_name, Key=name)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/botocore/client.py", line 530, in _api_call
[BACKEND][2023-11-13 12:45:47] return self._make_api_call(operation_name, kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/botocore/client.py", line 960, in _make_api_call
[BACKEND][2023-11-13 12:45:47] raise error_class(parsed_response, operation_name)
[BACKEND][2023-11-13 12:45:47] botocore.exceptions.ClientError: An error occurred (400) when calling the HeadObject operation: Bad Request
[BACKEND][2023-11-13 12:45:47] ERROR 2023-11-13 12:45:47,974 django.request.log_response:224- Internal Server Error: /api/user-files/upload-file/
[BACKEND][2023-11-13 12:45:47] Traceback (most recent call last):
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
[BACKEND][2023-11-13 12:45:47] raise exc_info[1]
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 38, in inner
[BACKEND][2023-11-13 12:45:47] response = await get_response(request)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 233, in _get_response_async
[BACKEND][2023-11-13 12:45:47] response = await wrapped_callback(request, *callback_args, **callback_kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
[BACKEND][2023-11-13 12:45:47] ret = await asyncio.wait_for(future, timeout=None)
[BACKEND][2023-11-13 12:45:47] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
[BACKEND][2023-11-13 12:45:47] return await fut
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
[BACKEND][2023-11-13 12:45:47] result = self.fn(*self.args, **self.kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 490, in thread_handler
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
[BACKEND][2023-11-13 12:45:47] return view_func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
[BACKEND][2023-11-13 12:45:47] return self.dispatch(request, *args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
[BACKEND][2023-11-13 12:45:47] response = self.handle_exception(exc)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
[BACKEND][2023-11-13 12:45:47] self.raise_uncaught_exception(exc)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
[BACKEND][2023-11-13 12:45:47] raise exc
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
[BACKEND][2023-11-13 12:45:47] response = handler(request, *args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/usr/lib/python3.9/contextlib.py", line 79, in inner
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwds)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/api/decorators.py", line 107, in func_wrapper
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/api/user_files/views.py", line 61, in post
[BACKEND][2023-11-13 12:45:47] user_file = UserFileHandler().upload_user_file(request.user, file.name, file)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/user_files/handler.py", line 252, in upload_user_file
[BACKEND][2023-11-13 12:45:47] self.generate_and_save_image_thumbnails(image, user_file, storage=storage)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/user_files/handler.py", line 168, in generate_and_save_image_thumbnails
[BACKEND][2023-11-13 12:45:47] handler.save(thumbnail_path, thumbnail_stream)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/storage.py", line 9, in save
[BACKEND][2023-11-13 12:45:47] if self.storage.exists(name):
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/storages/backends/s3boto3.py", line 463, in exists
[BACKEND][2023-11-13 12:45:47] self.connection.meta.client.head_object(Bucket=self.bucket_name, Key=name)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/botocore/client.py", line 530, in _api_call
[BACKEND][2023-11-13 12:45:47] return self._make_api_call(operation_name, kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/botocore/client.py", line 960, in _make_api_call
[BACKEND][2023-11-13 12:45:47] raise error_class(parsed_response, operation_name)
[BACKEND][2023-11-13 12:45:47] botocore.exceptions.ClientError: An error occurred (400) when calling the HeadObject operation: Bad Request
[BACKEND][2023-11-13 12:45:47] ERROR 2023-11-13 12:45:47,974 django.request.log_response:224- Internal Server Error: /api/user-files/upload-file/
[BACKEND][2023-11-13 12:45:47] Traceback (most recent call last):
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
[BACKEND][2023-11-13 12:45:47] raise exc_info[1]
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 38, in inner
[BACKEND][2023-11-13 12:45:47] response = await get_response(request)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 233, in _get_response_async
[BACKEND][2023-11-13 12:45:47] response = await wrapped_callback(request, *callback_args, **callback_kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in __call__
[BACKEND][2023-11-13 12:45:47] ret = await asyncio.wait_for(future, timeout=None)
[BACKEND][2023-11-13 12:45:47] File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
[BACKEND][2023-11-13 12:45:47] return await fut
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
[BACKEND][2023-11-13 12:45:47] result = self.fn(*self.args, **self.kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 490, in thread_handler
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
[BACKEND][2023-11-13 12:45:47] return view_func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
[BACKEND][2023-11-13 12:45:47] return self.dispatch(request, *args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
[BACKEND][2023-11-13 12:45:47] response = self.handle_exception(exc)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
[BACKEND][2023-11-13 12:45:47] self.raise_uncaught_exception(exc)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
[BACKEND][2023-11-13 12:45:47] raise exc
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
[BACKEND][2023-11-13 12:45:47] response = handler(request, *args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/usr/lib/python3.9/contextlib.py", line 79, in inner
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwds)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/api/decorators.py", line 107, in func_wrapper
[BACKEND][2023-11-13 12:45:47] return func(*args, **kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/api/user_files/views.py", line 61, in post
[BACKEND][2023-11-13 12:45:47] user_file = UserFileHandler().upload_user_file(request.user, file.name, file)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/user_files/handler.py", line 252, in upload_user_file
[BACKEND][2023-11-13 12:45:47] self.generate_and_save_image_thumbnails(image, user_file, storage=storage)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/user_files/handler.py", line 168, in generate_and_save_image_thumbnails
[BACKEND][2023-11-13 12:45:47] handler.save(thumbnail_path, thumbnail_stream)
[BACKEND][2023-11-13 12:45:47] File "/baserow/backend/src/baserow/core/storage.py", line 9, in save
[BACKEND][2023-11-13 12:45:47] if self.storage.exists(name):
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/storages/backends/s3boto3.py", line 463, in exists
[BACKEND][2023-11-13 12:45:47] self.connection.meta.client.head_object(Bucket=self.bucket_name, Key=name)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/botocore/client.py", line 530, in _api_call
[BACKEND][2023-11-13 12:45:47] return self._make_api_call(operation_name, kwargs)
[BACKEND][2023-11-13 12:45:47] File "/baserow/venv/lib/python3.9/site-packages/botocore/client.py", line 960, in _make_api_call
[BACKEND][2023-11-13 12:45:47] raise error_class(parsed_response, operation_name)
[BACKEND][2023-11-13 12:45:47] botocore.exceptions.ClientError: An error occurred (400) when calling the HeadObject operation: Bad Request
From the api, the call response:
{"error":"ERROR_FILE_URL_COULD_NOT_BE_REACHED","detail":"The provided URL could not be reached."}
I’ve updated from 1.18 to 1.21.2 few days ago, it can be linked.
Any ideas ?