django-libsql icon indicating copy to clipboard operation
django-libsql copied to clipboard

Status code: 401, message='Invalid response status'

Open tvavrys opened this issue 10 months ago • 4 comments

Something happened this or last week and I can't access Turso anymore with this library.

Error message

<libsql_client.hrana.conn.HranaConn object at 0xffffb89bd970>
OperationalError("401, message='Invalid response status', url='wss://<db>.turso.io'")
ConnectionHrana<281473792007088>
'libsql://<db>.turso.io?authToken=<token>'

Analysis

I believe that Turso broke backwards compatibility and libsql-client doesn't work anymore. See https://github.com/tursodatabase/libsql-client-py/issues/33

From Discord:

Yes, we are migrating starter users to AWS automatically. As Websockets are not supported at AWS - you need to change connection from wss to https

Suggestions

  1. use http connection instead of wss

tvavrys avatar Apr 02 '25 13:04 tvavrys

I tried to create a new backend by Gemini 2.5 Pro only to realize that the Turso v1 endpoint isn't accessible anymore and returns 404. Officiallibsql client still uses v1 API only for http connections. They said that they will discuss it as a team and try to update it soon.

tvavrys avatar Apr 02 '25 18:04 tvavrys

Have you found any way to fix this problem?

DungHandsome avatar Apr 10 '25 14:04 DungHandsome

@DungHandsome Nope. It requires a lot of effort, including forks, etc.

I've decided to stop using Turso.

tvavrys avatar Apr 10 '25 14:04 tvavrys

hmmm I see, Turso is a really generous platform. I wonder if there's any free database as good as Turso in terms of storage =((

DungHandsome avatar Apr 10 '25 14:04 DungHandsome