tursodatabase / libsql-experimental-python

libSQL API for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remote Database Connection Not Working

Aditya-Kumar-Code opened this issue · comments

Whenever i Run this code Which is in the official documentation of libsql-experimental .


import libsql_experimental as libsql

url = os.getenv("LIBSQL_URL")
auth_token = os.getenv("LIBSQL_AUTH_TOKEN")

con = libsql.connect(database=url, auth_token=auth_token)
cur = con.cursor()
cur.execute("CREATE TABLE users (id INTEGER, email TEXT);")


i get this error . I am using apple silicon chip.


 thread '<unnamed>' panicked at /Users/administrator/.cargo/git/checkouts/libsql-311658d335deb3b1/9de3ccc/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.