SQL queries failing - DtableDb Server Error

I have been experimenting with SQL queries against a self hosted base containing two tables.

I am currently getting “DtableDb Server Error.” when submitting simple, valid queries via the SQL plugin (e.g. SELECT * FROM testfruit). The same queries worked fine an hour or so ago.

Using the Python API, the errors look like:

  ConnectionError: [Errno 500] internal server error

Detailed traceback:
  File "/Users/jefferis/Library/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/seatable_api/main.py", line 795, in query
    data = parse_response(response)
  File "/Users/jefferis/Library/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/seatable_api/main.py", line 31, in parse_response
    raise ConnectionError(response.status_code, response.text)

Would you have any diagnosis? Perhaps we need to restart the seatable instance? The errors are present for both tables in a base, but another base hosted on the same docker is unaffected.

Many thanks for any help!


You can check the logs to find the corresponding error messages.

Thank you! The logs contain this:

2021/11/30 00:03:41 POST /api/v1/query/b2daf92d-d52c-40ac-8a3b-f14c431e89d2/: failed to get operations from database: failed to parse operation 23956: json: cannot unmarshal array into Go struct field opValue.row_ids of type string

As a reminder I can see the table I am trying to query in the web interface, the python list_rows method works ok; it’s just the query method that is broken. We are currently on Developer edition 2.4.0.

Thanks for posting the logs. That the problem happened “after an hour” and only happens to a single base makes it most likely a single case, which is hard to handle on the community support level.

Each SeaTable version comes with bug fixes and optimizations. Therefore, please upgrade to 2.5.0 which is the latest version, and see if the problem still occurs. If that doesn’t help, I’d be interested in what you have done to the base during the last hour? You can see the last activities in the “Activities” menu on the interface.

When upgrading, steps should be taken according to the Upgrade manual - SeaTable Admin Manual.

Thank you for your suggestions. Upgrading to Developer edition 2.5.0 has fixed the problem. I’m not sure if it was the new codebase or the upgrade procedure which was corrective.

For reference, the problem had persisted for a few days. The actions in the hour prior to the problem appearing consisted of updating or appending rows in a very small test table via the Python API and deleting rows via the web interface. Deleting and recreating the test table did not solve the problem.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.