Skip to content

Custom dataset location impossible? #896

Open

Description

@dmtvanzanten

Steps to reproduce

import qcodes as qc
from qcodes.dataset.sqlite_base import init_db, connect

dataDB = 'C:/Users/Junkie/Documents/Programming/Python/QCoDeS/datapool/experiments.db';
qc.config["core"]["db_location"] = dataDB;

conn = connect(dataDB, debug=True)
init_db(conn)

from qcodes.dataset.experiment_container import Experiment
from qcodes.dataset.measurements import Measurement
from qcodes import new_data_set, new_experiment

Expected behaviour

Use the database under the path dataDB for the storage of measurements..

Actual behaviour

It uses the database created under the current working directory instead.

System

operating system

qcodes branch
feature/dataset

qcodes commit

Activity

  1. dmtvanzanten commented on Dec 4, 2017

    @dmtvanzanten
    Author

    The file qcodes\dataset\experiment_container.py, host of new_data_set and new_experiment, contains the following line
    DB = qcodes.config["core"]["db_location"].
    As this is executed as soon as any part of qcodes is imported, the variable DB is set to the default config that is saved to the disk as part of the qcodes repository.

  2. added a commit that references this issue on Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions