benbc
Repos
52
Followers
31

Events

Ben test, please ignore
Created at 1 day ago
Ben test, please ignore
Created at 1 day ago
databuilder Docker image is not being published
Created at 2 days ago
Remove duplication in counting appointments
Created at 2 days ago
benbc create branch benbc/remove-appointment-duplication
Created at 2 days ago
Dummy data generation failure for `date_of_death.is_not_null()`

This minimal repro dataset:

from databuilder.ehrql import Dataset
from databuilder.tables.beta import tpp

dataset = Dataset()
dataset.set_population(tpp.patients.exists_for_patient())
dataset.has_died = tpp.patients.date_of_death.is_not_null()

invoked like this:

> opensafely exec databuilder:v0 generate-dataset dataset_definition.py

exits with code 130 and gives this error:

2023-01-25 11:51:37 [info     ] Generating dummy dataset for dataset_definition.py [databuilder.main] 
2023-01-25 11:51:37 [info     ] Attempting to generate 500 matching patients (random seed: BwRV3spP, timeout: 60s) [databuilder.dummy_data.generator] 
Traceback (most recent call last):
  File "/opt/venv/bin/databuilder", line 8, in <module>
    sys.exit(entrypoint())
  File "/app/databuilder/__main__.py", line 37, in entrypoint
    return main(sys.argv[1:], environ=os.environ)  # pragma: no cover
  File "/app/databuilder/__main__.py", line 69, in main
    function(**kwargs)
  File "/app/databuilder/main.py", line 55, in generate_dataset
    generate_dataset_with_dummy_data(
  File "/app/databuilder/main.py", line 97, in generate_dataset_with_dummy_data
    results = DummyDataGenerator(variable_definitions).get_results()
  File "/app/databuilder/dummy_data/generator.py", line 104, in get_results
    database.setup(self.get_data())
  File "/app/databuilder/dummy_data/generator.py", line 60, in get_data
    patient_batch = {
  File "/app/databuilder/dummy_data/generator.py", line 61, in <dictcomp>
    patient_id: list(
  File "/app/databuilder/dummy_data/generator.py", line 149, in get_patient_data
    rows = get_rows(table_info)
  File "/app/databuilder/dummy_data/generator.py", line 178, in rows_for_patients
    row[key] = value.replace(day=1)
AttributeError: 'NoneType' object has no attribute 'replace'
Created at 2 days ago