"View not found" when I made 2 "group by" : multi-select + text (364 lines)

Hi there !

I’m using BaseRow for a repository with many colums.

I had a “group by” text previously and I wanted to switch to 2 group by : multi-select + text
I could do it but the lines went white so I refresh the page.
now, I get this screen every time I want to access the table
image
I can’t switch on another view, only export the table.

I reproduce the same error by importing the data in a new table and trying again to group by those 2 types of columns.

Could you help me please ?

Océane

And now I can’t import again the CSV data on a new table (after blocking the 2nd table)…

Hey @oceane, I’m sorry to hear that you’re running into a problem. It looks like something is going wrong on the backend, causing your view not to load. Are you using the baserow.io, or are you self-hosting?

I’m self-hosting.
Do you want me to send something like errors on the server?

It would be great if you can share the output logs of your server, just after trying to open the view that failed. That should give us information on what’s going wrong specifically. Also, which version of Baserow are you running?

Sure !
Here it is :

baserow-backend-1  | ERROR 2024-12-04 11:20:34,809 django.request.log_response:224- Internal Server Error: /api/database/views/grid/2180/ 
baserow-backend-1  | Traceback (most recent call last):
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 486, in thread_handler
baserow-backend-1  |     raise exc_info[1]
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 38, in inner
baserow-backend-1  |     response = await get_response(request)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 233, in get_response_async
baserow-backend-1  |     response = await wrapped_callback(request, callback_args, *callback_kwargs)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 448, in _call
baserow-backend-1  |     ret = await asyncio.wait_for(future, timeout=None)
baserow-backend-1  |   File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
baserow-backend-1  |     return await fut
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/asgiref/current_thread_executor.py", line 22, in run
baserow-backend-1  |     result = self.fn(self.args, **self.kwargs)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/asgiref/sync.py", line 490, in thread_handler
baserow-backend-1  |     return func(args, kwargs)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
baserow-backend-1  |     return view_func(*args, kwargs)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
baserow-backend-1  |     return self.dispatch(request, args, kwargs)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
baserow-backend-1  |     response = self.handle_exception(exc)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
baserow-backend-1  |     self.raise_uncaught_exception(exc)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
baserow-backend-1  |     raise exc
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
baserow-backend-1  |     response = handler(request, *args, kwargs)
baserow-backend-1  |   File "/baserow/backend/src/baserow/api/decorators.py", line 107, in func_wrapper
baserow-backend-1  |     return func(args, kwargs)
baserow-backend-1  |   File "/baserow/backend/src/baserow/api/decorators.py", line 342, in func_wrapper
baserow-backend-1  |     return func(*args, kwargs)
baserow-backend-1  |   File "/baserow/backend/src/baserow/api/decorators.py", line 172, in func_wrapper
baserow-backend-1  |     return func(args, **kwargs)
baserow-backend-1  |   File "/baserow/backend/src/baserow/contrib/database/api/views/grid/views.py", line 313, in get
baserow-backend-1  |     group_by_metadata = view_handler.get_group_by_metadata_in_rows(
baserow-backend-1  |   File "/baserow/backend/src/baserow/core/telemetry/utils.py", line 72, in _wrapper
baserow-backend-1  |     raise ex
baserow-backend-1  |   File "/baserow/backend/src/baserow/core/telemetry/utils.py", line 68, in _wrapper
baserow-backend-1  |     result = wrapped_func(args, kwargs)
baserow-backend-1  |   File "/baserow/backend/src/baserow/contrib/database/views/handler.py", line 3396, in get_group_by_metadata_in_rows
baserow-backend-1  |     queryset.filter(q)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/query.py", line 941, in filter
baserow-backend-1  |     return self._filter_or_exclude(False, args, kwargs)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/query.py", line 961, in _filter_or_exclude
baserow-backend-1  |     clone._filter_or_exclude_inplace(negate, args, kwargs)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/query.py", line 968, in _filter_or_exclude_inplace
baserow-backend-1  |     self._query.add_q(Q(*args, kwargs))
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1416, in add_q
baserow-backend-1  |     clause, _ = self.add_q(q_object, self.used_aliases)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1435, in add_q
baserow-backend-1  |     child_clause, needed_inner = self.build_filter(
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1288, in build_filter
baserow-backend-1  |     return self._add_q(
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1435, in _add_q
baserow-backend-1  |     child_clause, needed_inner = self.build_filter(
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1370, in build_filter
baserow-backend-1  |     condition = self.build_lookup(lookups, col, value)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 1216, in build_lookup
baserow-backend-1  |     lookup = lookup_class(lhs, rhs)
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/lookups.py", line 25, in __init
baserow-backend-1  |     self.rhs = self.get_prep_lookup()
baserow-backend-1  |   File "/baserow/venv/lib/python3.9/site-packages/django/db/models/fields/related_lookups.py", line 108, in get_prep_lookup
baserow-backend-1  |     self.rhs = get_normalized_value(self.rhs, self.lhs)[0]
baserow-backend-1  | IndexError: tuple index out of range


@bram do you understand the problem ?
Our database is still blocked :frowning:

Hey @oceane, please make sure to always reply to my message, otherwise I don’t receive a notification of it.

The error doesn’t give me much information, to be honest. Based on the Python version, it looks like you’re running an older version of Baserow. Which version are running, and would you mind trying to update to the latest one?

Hey @bram
My colleague tried to update Baserow to the newer version but it request Postgres 12 or more. So we’ll need to update it with data migration.

Our current version is 1.22.1

Is there another way ?

Hey @oceane,

You can find the documentation here on how to do the upgrade: upgrading-from-a-previous-version.

I hope this help,
davide

Hi @davide
It seems that I have the same issue as this one :

Each wasn’t fixed apparently ? How can I be sure that upgrading is the solution (and won’t messed up even more at my data) ?

From the log I saw, only that view likely has some problem due to some unexpected value in the group by, but we might have fixed that issue in a later version.

Upgrading always carries a minimal risk, which is why we recommend making safety backups, as with any other application. However, the system has been thoroughly tested and used by many users, and I’m confident no data will be corrupted.

Anyway, upgrading might not be the only way: If the corrupted view is not the first and only view, you might be able to access your data by deleting the cookies in your browser. You’ll lose all the saved last accessed views, but you might be able to access your data again.

An alternative might be to delete that specific view via the API, so the UI will pick another one if available or let you create a new one. I know this is not the best UX, but I’ll discuss a better way to handle this situation with the team.

Thank you @davide I understand !
On our side, it required another person and some time to do an upgrade. That’s why I would prefer to find an alternative.
I tried deleting cookies, it didn’t work. Every user have this error.
Unfortunately, we don’t have daily “dump”.

Do you think we could find those “GROUP BY” in “database_viewfilter” to delete them directly ?

I’ll search about deleting a specific view

Thank for your help

You can remove it from the database_viewgroupby table, which should fix it.
Deleting a row from that table is a safe operation, but please be careful changing data directly in the DB, as you can corrupt your data.

It worked well by removing the specific Group by !
I managed to duplicate the base and apply the same group by, same result “View not found”.
If someone wants to look into this bug, I can give more details.

I’m glad to hear that you solved the issue.

Yes, it would be great if you share more details so we can verify whether we can reproduce the issue and, if so, solve it.