You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by lucas-hak August 10, 2023
Hello, I am trying to make a ConnectionPlus to a database. I am then using this to open a dataset by its id.
import qcodes.dataset as ds
from qcodes.dataset.sqlite.database import connect
with connect(file_path) as db:
dataset = ds.load_by_id(ds_id, db)
However when I run this I get an error.
ValueError: atomic context manager only accepts ConnectionPlus database connection objects.
When investigating this error it seems that the variable db I have initialized is a sqlite3.Connection object and not a ConnectionPlus object.
Am I using the connect function wrong? I want to be able to initialize this in a way that it closes to reduce the chance of keeping my datasets. If someone has advice about how I should handle this that would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Discussed in #5309
Originally posted by lucas-hak August 10, 2023
Hello, I am trying to make a ConnectionPlus to a database. I am then using this to open a dataset by its id.
However when I run this I get an error.
When investigating this error it seems that the variable
db
I have initialized is a sqlite3.Connection object and not a ConnectionPlus object.Am I using the
connect
function wrong? I want to be able to initialize this in a way that it closes to reduce the chance of keeping my datasets. If someone has advice about how I should handle this that would be greatly appreciated.The text was updated successfully, but these errors were encountered: