Remote connect gives ValueError: Hrana: `json error: `missing field `replication_index` at line 1 column 287``
patrickzbhe opened this issue · comments
Patrick He commented
Running the remote connect example of
url = os.getenv("LIBSQL_URL")
auth_token = os.getenv("LIBSQL_AUTH_TOKEN")
conn = libsql.connect(database=url, auth_token=auth_token)
conn.execute("CREATE TABLE IF NOT EXISTS users (id INTEGER);")
conn.execute("INSERT INTO users(id) VALUES (10);")
gives
Traceback (most recent call last):
File "xxx", line 14, in <module>
conn.execute("INSERT INTO users(id) VALUES (10);")
ValueError: Hrana: `json error: `missing field `replication_index` at line 1 column 287``
thread '<unnamed>' panicked at /root/.cargo/git/checkouts/libsql-311658d335deb3b1/b015002/libsql/src/hrana/hyper.rs:88:9:
there is no reactor running, must be called from the context of a Tokio 1.x runtime
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
pyo3_runtime.PanicException: there is no reactor running, must be called from the context of a Tokio 1.x runtime
running on ubuntu, wsl, python3.12.
Dan Stephenson commented
Similar error with Python 3.11.6
>>> cur.execute("INSERT INTO users VALUES (1, 'dan@example.org')")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Hrana: `json error: `missing field `replication_index` at line 1 column 286``
Dan Stephenson commented
downgrading libsql-experimental==0.0.25
to libsql-experimental==0.0.24
fixed the issue for me, must be a newly introduced issue with the latest version
alixTal commented
I have the same issue.
Pekka Enberg commented
Thanks @etos for pinging me. I opened an issue on libsql.git: tursodatabase/libsql#1075
Pekka Enberg commented
@etos and others: I just released 0.0.26, which should fix the problem.