140 questions
0votes
0answers
33views
Unable to limit memory(RAM) consumption in a FastAPI based service using Sqlite / AioSqlite
I have stored strings & their vector embeddings in a Sqlite DB file with the table name "query_metadata". Embeddings are stored as numpy bytes. The embeddings would be used for ...
-2votes
0answers
36views
discord.py | How to import channel id from database to send logs from bot
I made a database on SQLite3, there is guild ID and channel ID which one choosed from user to send logs here. I want the user to be able to independently select a channel to send all logs to and ...
0votes
0answers
26views
Using Arrow ADBC to register UDF
While chasing down performance and cleaner code, I've ran into this problem I've found that UDF's are seemingly connection dependent, not database dependent. If I, for instance, used a trigger on ...
0votes
2answers
51views
Attaching an adbc connection to an sqlite in-memory database
I have a setup where I'm utilizing two connections for sqlite: A dbapi-based sqlite connection from Arrow ADBC so I can have access to ingesting and fetching arrow data, and a native sqlite3 ...
0votes
1answer
33views
Flask Select query returning a cursor object or an empty list instead of a tuple of values
Here is my code in app.py: from flask import Flask, render_template, request, g import sys import sqlite3 import os current_directory = os.path.dirname(os.path.abspath(__file__)) app = Flask(...
0votes
1answer
69views
Extract information through SQLite and Python [closed]
I am working with a DataBase in Sqlite and Python with the table that is attached. I am interested in get a query that give me a list with an unique item in IDFrom, for those unique items, the VoltMag,...
1vote
2answers
86views
ModuleNotFoundError: No module named '_sqlite3' after installing spyder-kernels 3 for Spyder 6.0 IPython console
I am trying to use Spyder 6 IDE on Ubuntu 24.04. After installation of Spyder 6, I changed the default python interpreter to my virtual environment running Python 3.11 and installed spyder-kernels==3....
0votes
0answers
39views
Data retrieving and SQL database update
I'm trying to retrieve some data from an API and save them to a local database I created. All data come from Google Ads campaigns, and I need to make two separate calls because of their docs, but that'...
0votes
1answer
82views
How can I update display of chat history upon page refresh?
My chat UI using Gradio: import sqlite3 import gradio as gr import time formatted_history = [] sqlite = None def loadHistoryFromDB(): global sqlite,formatted_history sql="SELECT role,...
0votes
1answer
49views
Convert blob to bytes SQLite3 Python
Have a requirement of storing/retrieving bytes as a blob in SQLite3; The column definition in as follows:"bytes_as_blob " BLOB, Byte data is stored in the table using the following construct ...
0votes
0answers
44views
How to prevent "OperationalError: Database is locked" from discarding changes?
I have an application that periodically records data to a database with Python's SQLite3. Unfortunately, when I open the database with DBBrowser, it can sometimes lock the database. When this happens, ...
-1votes
1answer
90views
How do I instruct Python to use my own compiled SQLite3?
I have compiled my own version of SQLite3 amalgamation tarball from the download page and would like to include that into my Python3 script on MacOs. Is there a way to do that via import sqlite3? As ...
0votes
0answers
53views
Load custom compiled SQLite3 library into Python script
On macOS I have compiled my own version of SQLite 3 and moved that to /usr/local/lib ❯ ls /usr/local/lib libsqlite3.dylib sqlite3 However I can't seem to load that version of the SQLite into my ...
0votes
0answers
30views
"sqlite3.OperationalError: database is locked" on a brand-new database file
This code which has been working for years has now suddenly started returning the above error even for a newly created database. Here's the relevant code snippet: dbfile = os.path.expanduser(...
0votes
1answer
73views
Python sqlite3 cached in-memory database - is it supported?
Python 3.12, built-in sqlite3 package on MacOS Sonoma 14.5, using PyCharm community edition. I'm attempting to create an in-memory sqlite3 database that can be closed and reopened for each query. The ...