Running uv sessions I just get no module fts5. Tried to dig a bit, turns out my system python does have sqlite with fts5 working fine, but hermes uses uv to install its own python that lacks this.
As a simple test:
import os
from glob import glob
import sqlite3
print('sqlite version', sqlite3.sqlite_version)
print('version', sqlite3.version)
print('path:', sqlite3.__file__)
# Connect to database
conn = sqlite3.connect(':memory:')
cursor = conn.cursor()
# Create an FTS5 virtual table
cursor.execute("CREATE VIRTUAL TABLE posts USING fts5(title, body);")
# Insert sample data
cursor.execute("INSERT INTO posts (title, body) VALUES ('Python Tutorial', 'Learn SQLite FTS5 in Python.')")
cursor.execute("INSERT INTO posts (title, body) VALUES ('SQL Guide', 'Basic SQL queries for beginners.')")
# Query using MATCH
term = 'Python'
cursor.execute("SELECT * FROM posts WHERE posts MATCH ?", (term,))
results = cursor.fetchall()
print("FTS5 results:", results)
$ which python3.13
/usr/bin/python3.13
$ python3.13 --version
Python 3.13.13
$ python3.13 test_script.py
sqlite version 3.45.1
version 2.6.0
path: /usr/lib/python3.13/sqlite3/__init__.py
FTS5 results: [('Python Tutorial', 'Learn SQLite FTS5 in Python.')]
$ ~/.hermes/hermes-agent/venv/bin/python test_scirpt.py
sqlite version 3.49.1
version 2.6.0
path: /home/ob/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/sqlite3/__init__.py
Traceback (most recent call last):
File "/home/ob/tmp/explore_hermes_db.py", line 14, in <module>
cursor.execute("CREATE VIRTUAL TABLE posts USING fts5(title, body);")
sqlite3.OperationalError: no such module: fts5
any advice?