[FIXED] Intermittent DB error with tables.oder_by()

Hi,
For last couple of days, I’m getting intermittent error in the DB query when using table.order_by() clause.

Here is an example:

  questions = app_tables.questions.search(
    tables.order_by('create_time', ascending=False),
    status='ACTIVE'
  )

throws:

anvil.tables.TableError: Invalid argument to table query: #anvil.dispatcher.types.ValueType{:type “AsknAnswer.anvil.tables.order_by”, :value {:column_name “create_time”, :ascending false}}

When this error occurs, it keeps occurring persistently for some time. If I keep retrying, after some time, the error goes away. Very weird behavior.

Moving to Bug Reports, thanks for the report.

Thanks for the heads up. I believe this may now be fixed, please could you confirm whether the problem is still showing up from time to time?

Hi @shaun and @daviesian! Thank you for the quick response.

However, I’m still seeing the same error. :frowning_face:

One thing to note that the error has the term AsknAnswer. and I think it should have been ilmun. The project I started with has the name AsknAnswer, but then I duplicated it to ilmun. All my recent works are on this new ilmun project. But it seems to be referring to the original project named AsknAnswer. Not sure whether it has to do with anything or not.

Thanks!
-Arif

I am also currently seeing the same error on the same type of query.

app_tables.toolchoices.search(tables.order_by("tool_name"))

throws:

TableError: Invalid argument to table query: #anvil.dispatcher.types.ValueType{:type 
"ToolLifeManagement.anvil.tables.order_by", :value {:column_name "tool_name", :ascending true}}
at , line 1

Please can everyone try again now? I believe we have identified and fixed the issue. Thanks for your patience!

2 Likes

Works for me now.

Thanks.

yay…it WORKS :partying_face:
thanks @daviesian for fixing it so quickly…you guys rock!!!

cheers,
-Arif