Test passed, nothing to report
Test: codeshelf|loki|run_notebooks|loki-make-wavelength-lookup-table
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
table.array
------------------
#x1B[31m---------------------------------------------------------------------------#x1B[39m
#x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
#x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
#x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
#x1B[32m 2#x1B[39m table.array
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
#x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
#x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
#x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
#x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
#x1B[32m 174#x1B[39m **kwargs: Any,
#x1B[32m 175#x1B[39m ) -> Any:
#x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
#x1B[32m 178#x1B[39m
#x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
#x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
#x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
#x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
#x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
#x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
#x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
#x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
#x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
#x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
#x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
#x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
#x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
#x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
#x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
#x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
#x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
#x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m 255#x1B[39m task, data = loads(task_info)
#x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
#x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
#x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
#x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
#x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
#x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
#x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
#x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
#x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
#x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
#x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
#x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
#x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
#x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
#x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
#x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
#x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
#x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
#x1B[32m 499#x1B[39m tof_choppers = []
#x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
#x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
seed: ess.reduce.unwrap.lut.SimulationSeed,
facility: ess.reduce.unwrap.lut.SimulationFacility,
wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
Full output
notebook = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-392/codeshelf/src/loki/notebooks/loki-make-wavelength-lookup-table.ipynb')
run_codeshelf_notebook = <function _run_codeshelf_notebook at 0x7ff87d8e40e0>
tmp_path = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-392/test_run_notebooks_loki_make_w0')
def test_run_notebooks(
notebook: Path, run_codeshelf_notebook: Callable, tmp_path: Path
):
> run_codeshelf_notebook(notebook_path=notebook, run_path=tmp_path)
tests/codeshelf/codeshelf_test.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/codeshelf/conftest.py:128: in _run_codeshelf_notebook
ep.preprocess(nb, {"metadata": {"path": run_path}})
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
self.preprocess_cell(cell, resources, index)
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
return loop.run_until_complete(inner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/miniforge/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7ff87d659460>
cell = {'cell_type': 'code', 'execution_count': 3, 'id': '5', 'metadata': {'execution': {'iopub.status.busy': '2026-09-22T13:...educe.nexus.types.AnyRun]']}], 'source': 'table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])\ntable.array'}
cell_index = 5
exec_reply = {'header': {'msg_id': '1d83cc5e-7e4f1e72a6936cd4528b776f_1040849_19', 'msg_type': 'execute_reply', 'username': 'userna...9_4', 'msg_type': 'execute_request', 'username': 'username', 'session': '78a48801-165a9f2d2a4a321e8cf417d0', ...}, ...}
async def _check_raise_for_error(
self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
) -> None:
if exec_reply is None:
return None
exec_reply_content = exec_reply["content"]
if exec_reply_content["status"] != "error":
return None
cell_allows_errors = (not self.force_raise_errors) and (
self.allow_errors
or exec_reply_content.get("ename") in self.allow_error_names
or "raises-exception" in cell.metadata.get("tags", [])
)
await run_hook(
self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
)
if not cell_allows_errors:
> raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E ------------------
E table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E table.array
E ------------------
E
E
E #x1B[31m---------------------------------------------------------------------------#x1B[39m
E #x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
E #x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
E #x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E #x1B[32m 2#x1B[39m table.array
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
E #x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
E #x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
E #x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
E #x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
E #x1B[32m 174#x1B[39m **kwargs: Any,
E #x1B[32m 175#x1B[39m ) -> Any:
E #x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
E #x1B[32m 178#x1B[39m
E #x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
E #x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
E #x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
E #x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
E #x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
E #x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
E #x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
E #x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
E #x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
E #x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
E #x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
E #x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
E #x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
E #x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
E #x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
E #x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
E #x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
E #x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m 255#x1B[39m task, data = loads(task_info)
E #x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
E #x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
E #x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
E #x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
E #x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
E #x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
E #x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
E #x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
E #x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/2/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
E #x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
E #x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
E #x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
E #x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
E #x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
E #x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
E #x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
E #x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
E #x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
E #x1B[32m 499#x1B[39m tof_choppers = []
E #x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
E
E #x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
E In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
E choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
E source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
E neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
E pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
E seed: ess.reduce.unwrap.lut.SimulationSeed,
E facility: ess.reduce.unwrap.lut.SimulationFacility,
E wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
E wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
E ) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
table.array
------------------
#x1B[31m---------------------------------------------------------------------------#x1B[39m
#x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
#x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
#x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
#x1B[32m 2#x1B[39m table.array
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
#x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
#x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
#x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
#x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
#x1B[32m 174#x1B[39m **kwargs: Any,
#x1B[32m 175#x1B[39m ) -> Any:
#x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
#x1B[32m 178#x1B[39m
#x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
#x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
#x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
#x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
#x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
#x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
#x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
#x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
#x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
#x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
#x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
#x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
#x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
#x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
#x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
#x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
#x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
#x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m 255#x1B[39m task, data = loads(task_info)
#x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
#x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
#x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
#x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
#x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
#x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
#x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
#x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
#x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
#x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
#x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
#x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
#x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
#x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
#x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
#x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
#x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
#x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
#x1B[32m 499#x1B[39m tof_choppers = []
#x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
#x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
seed: ess.reduce.unwrap.lut.SimulationSeed,
facility: ess.reduce.unwrap.lut.SimulationFacility,
wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
Full output
notebook = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-380/codeshelf/src/loki/notebooks/loki-make-wavelength-lookup-table.ipynb')
run_codeshelf_notebook = <function _run_codeshelf_notebook at 0x7fddc98280e0>
tmp_path = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-380/test_run_notebooks_loki_make_w0')
def test_run_notebooks(
notebook: Path, run_codeshelf_notebook: Callable, tmp_path: Path
):
> run_codeshelf_notebook(notebook_path=notebook, run_path=tmp_path)
tests/codeshelf/codeshelf_test.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/codeshelf/conftest.py:104: in _run_codeshelf_notebook
ep.preprocess(nb, {"metadata": {"path": run_path}})
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
self.preprocess_cell(cell, resources, index)
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
return loop.run_until_complete(inner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/miniforge/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7fddc9202f90>
cell = {'cell_type': 'code', 'execution_count': 3, 'id': '5', 'metadata': {'execution': {'iopub.status.busy': '2026-09-22T09:...educe.nexus.types.AnyRun]']}], 'source': 'table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])\ntable.array'}
cell_index = 5
exec_reply = {'header': {'msg_id': 'ec4ed2e3-12b48aef6246f19b9f4c91d6_932009_23', 'msg_type': 'execute_reply', 'username': 'usernam...3_4', 'msg_type': 'execute_request', 'username': 'username', 'session': '975a30de-9c3a53d5e396f7888973c638', ...}, ...}
async def _check_raise_for_error(
self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
) -> None:
if exec_reply is None:
return None
exec_reply_content = exec_reply["content"]
if exec_reply_content["status"] != "error":
return None
cell_allows_errors = (not self.force_raise_errors) and (
self.allow_errors
or exec_reply_content.get("ename") in self.allow_error_names
or "raises-exception" in cell.metadata.get("tags", [])
)
await run_hook(
self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
)
if not cell_allows_errors:
> raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E ------------------
E table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E table.array
E ------------------
E
E
E #x1B[31m---------------------------------------------------------------------------#x1B[39m
E #x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
E #x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
E #x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E #x1B[32m 2#x1B[39m table.array
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
E #x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
E #x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
E #x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
E #x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
E #x1B[32m 174#x1B[39m **kwargs: Any,
E #x1B[32m 175#x1B[39m ) -> Any:
E #x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
E #x1B[32m 178#x1B[39m
E #x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
E #x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
E #x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
E #x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
E #x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
E #x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
E #x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
E #x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
E #x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
E #x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
E #x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
E #x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
E #x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
E #x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
E #x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
E #x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
E #x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
E #x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m 255#x1B[39m task, data = loads(task_info)
E #x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
E #x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
E #x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
E #x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
E #x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
E #x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
E #x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
E #x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
E #x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
E #x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
E #x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
E #x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
E #x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
E #x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
E #x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
E #x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
E #x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
E #x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
E #x1B[32m 499#x1B[39m tof_choppers = []
E #x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
E
E #x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
E In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
E choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
E source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
E neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
E pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
E seed: ess.reduce.unwrap.lut.SimulationSeed,
E facility: ess.reduce.unwrap.lut.SimulationFacility,
E wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
E wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
E ) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
table.array
------------------
#x1B[31m---------------------------------------------------------------------------#x1B[39m
#x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
#x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
#x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
#x1B[32m 2#x1B[39m table.array
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
#x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
#x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
#x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
#x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
#x1B[32m 174#x1B[39m **kwargs: Any,
#x1B[32m 175#x1B[39m ) -> Any:
#x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
#x1B[32m 178#x1B[39m
#x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
#x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
#x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
#x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
#x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
#x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
#x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
#x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
#x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
#x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
#x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
#x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
#x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
#x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
#x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
#x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
#x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
#x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m 255#x1B[39m task, data = loads(task_info)
#x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
#x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
#x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
#x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
#x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
#x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
#x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
#x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
#x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
#x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
#x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
#x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
#x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
#x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
#x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
#x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
#x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
#x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
#x1B[32m 499#x1B[39m tof_choppers = []
#x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
#x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
seed: ess.reduce.unwrap.lut.SimulationSeed,
facility: ess.reduce.unwrap.lut.SimulationFacility,
wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
Full output
notebook = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-369/codeshelf/src/loki/notebooks/loki-make-wavelength-lookup-table.ipynb')
run_codeshelf_notebook = <function _run_codeshelf_notebook at 0x7f7bf3ea00e0>
tmp_path = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-369/test_run_notebooks_loki_make_w0')
def test_run_notebooks(
notebook: Path, run_codeshelf_notebook: Callable, tmp_path: Path
):
> run_codeshelf_notebook(notebook_path=notebook, run_path=tmp_path)
tests/codeshelf/codeshelf_test.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/codeshelf/conftest.py:104: in _run_codeshelf_notebook
ep.preprocess(nb, {"metadata": {"path": run_path}})
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
self.preprocess_cell(cell, resources, index)
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
return loop.run_until_complete(inner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/miniforge/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f7bf38566c0>
cell = {'cell_type': 'code', 'execution_count': 3, 'id': '5', 'metadata': {'execution': {'iopub.status.busy': '2026-09-22T09:...educe.nexus.types.AnyRun]']}], 'source': 'table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])\ntable.array'}
cell_index = 5
exec_reply = {'header': {'msg_id': 'c1d70613-4d323e89a942707613e8c6c2_892719_23', 'msg_type': 'execute_reply', 'username': 'usernam...5_4', 'msg_type': 'execute_request', 'username': 'username', 'session': 'fe7a43f4-b77586acc4d2f921b6fe04fe', ...}, ...}
async def _check_raise_for_error(
self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
) -> None:
if exec_reply is None:
return None
exec_reply_content = exec_reply["content"]
if exec_reply_content["status"] != "error":
return None
cell_allows_errors = (not self.force_raise_errors) and (
self.allow_errors
or exec_reply_content.get("ename") in self.allow_error_names
or "raises-exception" in cell.metadata.get("tags", [])
)
await run_hook(
self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
)
if not cell_allows_errors:
> raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E ------------------
E table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E table.array
E ------------------
E
E
E #x1B[31m---------------------------------------------------------------------------#x1B[39m
E #x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
E #x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
E #x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E #x1B[32m 2#x1B[39m table.array
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
E #x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
E #x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
E #x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
E #x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
E #x1B[32m 174#x1B[39m **kwargs: Any,
E #x1B[32m 175#x1B[39m ) -> Any:
E #x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
E #x1B[32m 178#x1B[39m
E #x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
E #x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
E #x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
E #x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
E #x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
E #x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
E #x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
E #x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
E #x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
E #x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
E #x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
E #x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
E #x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
E #x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
E #x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
E #x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
E #x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
E #x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m 255#x1B[39m task, data = loads(task_info)
E #x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
E #x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
E #x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
E #x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
E #x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
E #x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
E #x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
E #x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
E #x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
E #x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
E #x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
E #x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
E #x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
E #x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
E #x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
E #x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
E #x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
E #x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
E #x1B[32m 499#x1B[39m tof_choppers = []
E #x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
E
E #x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
E In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
E choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
E source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
E neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
E pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
E seed: ess.reduce.unwrap.lut.SimulationSeed,
E facility: ess.reduce.unwrap.lut.SimulationFacility,
E wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
E wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
E ) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
table.array
------------------
#x1B[31m---------------------------------------------------------------------------#x1B[39m
#x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
#x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
#x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
#x1B[32m 2#x1B[39m table.array
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
#x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
#x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
#x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
#x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
#x1B[32m 174#x1B[39m **kwargs: Any,
#x1B[32m 175#x1B[39m ) -> Any:
#x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
#x1B[32m 178#x1B[39m
#x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
#x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
#x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
#x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
#x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
#x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
#x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
#x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
#x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
#x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
#x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
#x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
#x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
#x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
#x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
#x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
#x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
#x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m 255#x1B[39m task, data = loads(task_info)
#x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
#x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
#x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
#x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
#x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
#x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
#x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
#x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
#x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
#x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
#x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
#x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
#x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
#x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
#x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
#x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
#x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
#x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
#x1B[32m 499#x1B[39m tof_choppers = []
#x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
#x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
seed: ess.reduce.unwrap.lut.SimulationSeed,
facility: ess.reduce.unwrap.lut.SimulationFacility,
wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
Full output
notebook = PosixPath('/home/gitlab-runner/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/.pytest_cache/codeshelf/repo/src/loki/notebooks/loki-make-wavelength-lookup-table.ipynb')
run_codeshelf_notebook = <function _run_codeshelf_notebook at 0x7fda90610220>
tmp_path = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-360/test_run_notebooks_loki_make_w0')
def test_run_notebooks(
notebook: Path, run_codeshelf_notebook: Callable, tmp_path: Path
):
> run_codeshelf_notebook(notebook_path=notebook, run_path=tmp_path)
tests/codeshelf/codeshelf_test.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/codeshelf/conftest.py:144: in _run_codeshelf_notebook
ep.preprocess(nb, {"metadata": {"path": run_path}})
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
self.preprocess_cell(cell, resources, index)
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
return loop.run_until_complete(inner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/miniforge/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7fda9022f4a0>
cell = {'cell_type': 'code', 'execution_count': 3, 'id': '5', 'metadata': {'execution': {'iopub.status.busy': '2026-09-22T07:...educe.nexus.types.AnyRun]']}], 'source': 'table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])\ntable.array'}
cell_index = 5
exec_reply = {'header': {'msg_id': '1131ad06-a1fad19ab08100743345966d_847926_23', 'msg_type': 'execute_reply', 'username': 'usernam...5_4', 'msg_type': 'execute_request', 'username': 'username', 'session': '1f076f02-4cbfe85722d5ce29014ab0d0', ...}, ...}
async def _check_raise_for_error(
self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
) -> None:
if exec_reply is None:
return None
exec_reply_content = exec_reply["content"]
if exec_reply_content["status"] != "error":
return None
cell_allows_errors = (not self.force_raise_errors) and (
self.allow_errors
or exec_reply_content.get("ename") in self.allow_error_names
or "raises-exception" in cell.metadata.get("tags", [])
)
await run_hook(
self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
)
if not cell_allows_errors:
> raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E ------------------
E table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E table.array
E ------------------
E
E
E #x1B[31m---------------------------------------------------------------------------#x1B[39m
E #x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
E #x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
E #x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E #x1B[32m 2#x1B[39m table.array
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
E #x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
E #x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
E #x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
E #x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
E #x1B[32m 174#x1B[39m **kwargs: Any,
E #x1B[32m 175#x1B[39m ) -> Any:
E #x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
E #x1B[32m 178#x1B[39m
E #x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
E #x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
E #x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
E #x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
E #x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
E #x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
E #x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
E #x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
E #x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
E #x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
E #x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
E #x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
E #x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
E #x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
E #x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
E #x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
E #x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
E #x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m 255#x1B[39m task, data = loads(task_info)
E #x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
E #x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
E #x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
E #x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
E #x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
E #x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
E #x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
E #x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
E #x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
E #x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
E #x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
E #x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
E #x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
E #x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
E #x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
E #x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
E #x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
E #x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
E #x1B[32m 499#x1B[39m tof_choppers = []
E #x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
E
E #x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
E In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
E choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
E source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
E neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
E pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
E seed: ess.reduce.unwrap.lut.SimulationSeed,
E facility: ess.reduce.unwrap.lut.SimulationFacility,
E wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
E wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
E ) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
table.array
------------------
#x1B[31m---------------------------------------------------------------------------#x1B[39m
#x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
#x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
#x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
#x1B[32m 2#x1B[39m table.array
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
#x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
#x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
#x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
#x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
#x1B[32m 174#x1B[39m **kwargs: Any,
#x1B[32m 175#x1B[39m ) -> Any:
#x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
#x1B[32m 178#x1B[39m
#x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
#x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
#x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
#x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
#x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
#x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
#x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
#x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
#x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
#x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
#x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
#x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
#x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
#x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
#x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
#x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
#x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
#x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m 255#x1B[39m task, data = loads(task_info)
#x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
#x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
#x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
#x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
#x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
#x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
#x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
#x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
#x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
#x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
#x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
#x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
#x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
#x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
#x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
#x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
#x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
#x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
#x1B[32m 499#x1B[39m tof_choppers = []
#x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
#x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
seed: ess.reduce.unwrap.lut.SimulationSeed,
facility: ess.reduce.unwrap.lut.SimulationFacility,
wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
Full output
notebook = PosixPath('/home/gitlab-runner/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/.pytest_cache/codeshelf/repo/src/loki/notebooks/loki-make-wavelength-lookup-table.ipynb')
run_codeshelf_notebook = <function _run_codeshelf_notebook at 0x7f4392050220>
tmp_path = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-353/test_run_notebooks_loki_make_w0')
def test_run_notebooks(
notebook: Path, run_codeshelf_notebook: Callable, tmp_path: Path
):
> run_codeshelf_notebook(notebook_path=notebook, run_path=tmp_path)
tests/codeshelf/codeshelf_test.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/codeshelf/conftest.py:138: in _run_codeshelf_notebook
ep.preprocess(nb, {"metadata": {"path": run_path}})
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
self.preprocess_cell(cell, resources, index)
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
return loop.run_until_complete(inner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/miniforge/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f4391caba70>
cell = {'cell_type': 'code', 'execution_count': 3, 'id': '5', 'metadata': {'execution': {'iopub.status.busy': '2026-09-22T07:...educe.nexus.types.AnyRun]']}], 'source': 'table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])\ntable.array'}
cell_index = 5
exec_reply = {'header': {'msg_id': '918cb036-f57228a4320059ab7a12759b_808323_23', 'msg_type': 'execute_reply', 'username': 'usernam...5_4', 'msg_type': 'execute_request', 'username': 'username', 'session': '94774112-15afe49f508c511b6db2e982', ...}, ...}
async def _check_raise_for_error(
self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
) -> None:
if exec_reply is None:
return None
exec_reply_content = exec_reply["content"]
if exec_reply_content["status"] != "error":
return None
cell_allows_errors = (not self.force_raise_errors) and (
self.allow_errors
or exec_reply_content.get("ename") in self.allow_error_names
or "raises-exception" in cell.metadata.get("tags", [])
)
await run_hook(
self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
)
if not cell_allows_errors:
> raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E ------------------
E table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E table.array
E ------------------
E
E
E #x1B[31m---------------------------------------------------------------------------#x1B[39m
E #x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
E #x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
E #x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E #x1B[32m 2#x1B[39m table.array
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
E #x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
E #x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
E #x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
E #x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
E #x1B[32m 174#x1B[39m **kwargs: Any,
E #x1B[32m 175#x1B[39m ) -> Any:
E #x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
E #x1B[32m 178#x1B[39m
E #x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
E #x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
E #x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
E #x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
E #x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
E #x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
E #x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
E #x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
E #x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
E #x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
E #x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
E #x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
E #x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
E #x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
E #x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
E #x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
E #x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
E #x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m 255#x1B[39m task, data = loads(task_info)
E #x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
E #x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
E #x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
E #x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
E #x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
E #x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
E #x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
E #x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
E #x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/0/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
E #x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
E #x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
E #x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
E #x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
E #x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
E #x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
E #x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
E #x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
E #x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
E #x1B[32m 499#x1B[39m tof_choppers = []
E #x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
E
E #x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
E In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
E choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
E source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
E neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
E pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
E seed: ess.reduce.unwrap.lut.SimulationSeed,
E facility: ess.reduce.unwrap.lut.SimulationFacility,
E wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
E wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
E ) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
table.array
------------------
#x1B[31m---------------------------------------------------------------------------#x1B[39m
#x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
#x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
#x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
#x1B[32m 2#x1B[39m table.array
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
#x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
#x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
#x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
#x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
#x1B[32m 174#x1B[39m **kwargs: Any,
#x1B[32m 175#x1B[39m ) -> Any:
#x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
#x1B[32m 178#x1B[39m
#x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
#x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
#x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
#x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
#x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
#x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
#x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
#x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
#x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
#x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
#x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
#x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
#x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
#x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
#x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
#x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
#x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
#x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
#x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m 255#x1B[39m task, data = loads(task_info)
#x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
#x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
#x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
#x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
#x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
#x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
#x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
#x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
#x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
#x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
#x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
#x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
#x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
#x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
#x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
#x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
#x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
#x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
#x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
#x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
#x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
#x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
#x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
#x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
#x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
#x1B[32m 499#x1B[39m tof_choppers = []
#x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
#x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
seed: ess.reduce.unwrap.lut.SimulationSeed,
facility: ess.reduce.unwrap.lut.SimulationFacility,
wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError
Full output
notebook = PosixPath('/home/gitlab-runner/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/.pytest_cache/codeshelf/repo/src/loki/notebooks/loki-make-wavelength-lookup-table.ipynb')
run_codeshelf_notebook = <function _run_codeshelf_notebook at 0x7ff869b68220>
tmp_path = PosixPath('/tmp/pytest-of-gitlab-runner/pytest-346/test_run_notebooks_loki_make_w0')
def test_run_notebooks(
notebook: Path, run_codeshelf_notebook: Callable, tmp_path: Path
):
> run_codeshelf_notebook(notebook_path=notebook, run_path=tmp_path)
tests/codeshelf/codeshelf_test.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/codeshelf/conftest.py:138: in _run_codeshelf_notebook
ep.preprocess(nb, {"metadata": {"path": run_path}})
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:103: in preprocess
self.preprocess_cell(cell, resources, index)
.tox/codeshelf-loki/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py:124: in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
return loop.run_until_complete(inner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/miniforge/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:1062: in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7ff8697521e0>
cell = {'cell_type': 'code', 'execution_count': 3, 'id': '5', 'metadata': {'execution': {'iopub.status.busy': '2026-09-22T07:...educe.nexus.types.AnyRun]']}], 'source': 'table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])\ntable.array'}
cell_index = 5
exec_reply = {'header': {'msg_id': '6b5aca20-231018f69e9a63b173b86a6e_769264_23', 'msg_type': 'execute_reply', 'username': 'usernam...5_4', 'msg_type': 'execute_request', 'username': 'username', 'session': '1a5a1555-f509668ab09e64354df7a85b', ...}, ...}
async def _check_raise_for_error(
self, cell: NotebookNode, cell_index: int, exec_reply: dict[str, t.Any] | None
) -> None:
if exec_reply is None:
return None
exec_reply_content = exec_reply["content"]
if exec_reply_content["status"] != "error":
return None
cell_allows_errors = (not self.force_raise_errors) and (
self.allow_errors
or exec_reply_content.get("ename") in self.allow_error_names
or "raises-exception" in cell.metadata.get("tags", [])
)
await run_hook(
self.on_cell_error, cell=cell, cell_index=cell_index, execute_reply=exec_reply
)
if not cell_allows_errors:
> raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
E nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
E ------------------
E table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E table.array
E ------------------
E
E
E #x1B[31m---------------------------------------------------------------------------#x1B[39m
E #x1B[31mModuleNotFoundError#x1B[39m Traceback (most recent call last)
E #x1B[36mCell#x1B[39m#x1B[36m #x1B[39m#x1B[32mIn[3]#x1B[39m#x1B[32m, line 1#x1B[39m
E #x1B[32m----> #x1B[39m#x1B[32m1#x1B[39m table = wf.compute(unwrap.LookupTable[AnyRun, snx.NXdetector])
E #x1B[32m 2#x1B[39m table.array
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/pipeline.py:191#x1B[39m, in #x1B[36mPipeline.compute#x1B[39m#x1B[34m(self, tp, reporter, **kwargs)#x1B[39m
E #x1B[32m 170#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34mcompute#x1B[39m(
E #x1B[32m 171#x1B[39m #x1B[38;5;28mself#x1B[39m,
E #x1B[32m 172#x1B[39m tp: #x1B[38;5;28mtype#x1B[39m | Iterable[#x1B[38;5;28mtype#x1B[39m] | #x1B[33m"#x1B[39m#x1B[33mUnionType#x1B[39m#x1B[33m"#x1B[39m, #x1B[38;5;66;03m# noqa: UP037 (needed by Sphinx)#x1B[39;00m
E #x1B[32m 173#x1B[39m reporter: Reporter | #x1B[38;5;28;01mNone#x1B[39;00m = #x1B[38;5;28;01mNone#x1B[39;00m,
E #x1B[32m 174#x1B[39m **kwargs: Any,
E #x1B[32m 175#x1B[39m ) -> Any:
E #x1B[32m 176#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 177#x1B[39m #x1B[33;03m Compute result for the given keys.#x1B[39;00m
E #x1B[32m 178#x1B[39m
E #x1B[32m (...)#x1B[39m#x1B[32m 189#x1B[39m #x1B[33;03m Keyword arguments passed to the ``.get()`` method.#x1B[39;00m
E #x1B[32m 190#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m191#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mtp#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mcompute#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/task_graph.py:122#x1B[39m, in #x1B[36mTaskGraph.compute#x1B[39m#x1B[34m(self, targets, reporter)#x1B[39m
E #x1B[32m 120#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mdict#x1B[39m(#x1B[38;5;28mzip#x1B[39m(targets, results, strict=#x1B[38;5;28;01mTrue#x1B[39;00m))
E #x1B[32m 121#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m122#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_scheduler#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mget#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_graph#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m[#x1B[39;49m#x1B[30;43mtargets#x1B[39;49m#x1B[30;43m]#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mreporter#x1B[39;49m#x1B[30;43m)#x1B[39;49m[#x1B[32m0#x1B[39m]
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/scheduler.py:140#x1B[39m, in #x1B[36mDaskScheduler.get#x1B[39m#x1B[34m(self, graph, keys, reporter)#x1B[39m
E #x1B[32m 138#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m reporter.run_computation(graph.values()):
E #x1B[32m 139#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m140#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_dask_get#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mlist#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mmap#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m_to_dask_key#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 141#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mRuntimeError#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 142#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m #x1B[38;5;28mstr#x1B[39m(e).startswith(#x1B[33m"#x1B[39m#x1B[33mCycle detected#x1B[39m#x1B[33m"#x1B[39m):
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/threaded.py:115#x1B[39m, in #x1B[36mget#x1B[39m#x1B[34m(dsk, keys, cache, num_workers, pool, **kwargs)#x1B[39m
E #x1B[32m 112#x1B[39m #x1B[38;5;28;01melif#x1B[39;00m #x1B[38;5;28misinstance#x1B[39m(pool, multiprocessing.pool.Pool):
E #x1B[32m 113#x1B[39m pool = MultiprocessingPoolExecutor(pool)
E #x1B[32m--> #x1B[39m#x1B[32m115#x1B[39m results = #x1B[30;43mget_async#x1B[39;49m#x1B[30;43m(#x1B[39;49m
E #x1B[32m 116#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43msubmit#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 117#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpool#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_max_workers#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 118#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mdsk#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 119#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mkeys#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 120#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mcache#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 121#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mget_id#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43m_thread_get_id#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 122#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m=#x1B[39;49m#x1B[30;43mpack_exception#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 123#x1B[39m #x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m,#x1B[39;49m
E #x1B[32m 124#x1B[39m #x1B[30;43m#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 126#x1B[39m #x1B[38;5;66;03m# Cleanup pools associated to dead threads#x1B[39;00m
E #x1B[32m 127#x1B[39m #x1B[38;5;28;01mwith#x1B[39;00m pools_lock:
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:547#x1B[39m, in #x1B[36mget_async#x1B[39m#x1B[34m(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)#x1B[39m
E #x1B[32m 545#x1B[39m task(data) #x1B[38;5;66;03m# Re-execute locally#x1B[39;00m
E #x1B[32m 546#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m547#x1B[39m #x1B[30;43mraise_exception#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mexc#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43mtb#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 548#x1B[39m res, worker_id = loads(res_info)
E #x1B[32m 549#x1B[39m state[#x1B[33m"#x1B[39m#x1B[33mcache#x1B[39m#x1B[33m"#x1B[39m][key] = res
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:351#x1B[39m, in #x1B[36mreraise#x1B[39m#x1B[34m(exc, tb)#x1B[39m
E #x1B[32m 349#x1B[39m #x1B[38;5;28;01mif#x1B[39;00m exc.__traceback__ #x1B[38;5;129;01mis#x1B[39;00m #x1B[38;5;129;01mnot#x1B[39;00m tb:
E #x1B[32m 350#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc.with_traceback(tb)
E #x1B[32m--> #x1B[39m#x1B[32m351#x1B[39m #x1B[38;5;28;01mraise#x1B[39;00m exc
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/local.py:256#x1B[39m, in #x1B[36mexecute_task#x1B[39m#x1B[34m(key, task_info, dumps, loads, get_id, pack_exception)#x1B[39m
E #x1B[32m 254#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m 255#x1B[39m task, data = loads(task_info)
E #x1B[32m--> #x1B[39m#x1B[32m256#x1B[39m result = #x1B[30;43mtask#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43mdata#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 257#x1B[39m #x1B[38;5;28mid#x1B[39m = get_id()
E #x1B[32m 258#x1B[39m result = dumps((result, #x1B[38;5;28mid#x1B[39m))
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/_task_spec.py:768#x1B[39m, in #x1B[36mTask.__call__#x1B[39m#x1B[34m(self, values)#x1B[39m
E #x1B[32m 766#x1B[39m kwargs = {k: _eval(kw) #x1B[38;5;28;01mfor#x1B[39;00m k, kw #x1B[38;5;129;01min#x1B[39;00m #x1B[38;5;28mself#x1B[39m.kwargs.items()}
E #x1B[32m 767#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[38;5;28mself#x1B[39m.func(*new_argspec, **kwargs)
E #x1B[32m--> #x1B[39m#x1B[32m768#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mnew_argspec#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/dask/utils.py:81#x1B[39m, in #x1B[36mapply#x1B[39m#x1B[34m(func, args, kwargs)#x1B[39m
E #x1B[32m 79#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m func(*args, **kwargs)
E #x1B[32m 80#x1B[39m #x1B[38;5;28;01melse#x1B[39;00m:
E #x1B[32m---> #x1B[39m#x1B[32m81#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mfunc#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/sciline/_provider.py:145#x1B[39m, in #x1B[36mProvider.__call__#x1B[39m#x1B[34m(self, *args, **kwargs)#x1B[39m
E #x1B[32m 143#x1B[39m #x1B[38;5;250m#x1B[39m#x1B[33;03m"""Call the provider."""#x1B[39;00m
E #x1B[32m 144#x1B[39m #x1B[38;5;28;01mtry#x1B[39;00m:
E #x1B[32m--> #x1B[39m#x1B[32m145#x1B[39m #x1B[38;5;28;01mreturn#x1B[39;00m #x1B[30;43mself#x1B[39;49m#x1B[30;43m.#x1B[39;49m#x1B[30;43m_func#x1B[39;49m#x1B[30;43m(#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43margs#x1B[39;49m#x1B[30;43m,#x1B[39;49m#x1B[30;43m #x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43m*#x1B[39;49m#x1B[30;43mkwargs#x1B[39;49m#x1B[30;43m)#x1B[39;49m
E #x1B[32m 146#x1B[39m #x1B[38;5;28;01mexcept#x1B[39;00m #x1B[38;5;167;01mException#x1B[39;00m #x1B[38;5;28;01mas#x1B[39;00m e:
E #x1B[32m 147#x1B[39m name = #x1B[33mf#x1B[39m#x1B[33m"#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.module#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m.#x1B[39m#x1B[38;5;132;01m{#x1B[39;00m#x1B[38;5;28mself#x1B[39m.location.name#x1B[38;5;132;01m}#x1B[39;00m#x1B[33m"#x1B[39m
E
E #x1B[36mFile #x1B[39m#x1B[32m~/builds/sr_srNBdt/4/dmsc-nightly/dmsc-nightly/.tox/codeshelf-loki/lib/python3.12/site-packages/ess/reduce/unwrap/lut.py:497#x1B[39m, in #x1B[36msimulate_chopper_cascade_using_tof#x1B[39m#x1B[34m(choppers, source_position, neutrons, pulse_stride, seed, facility, wmin, wmax)#x1B[39m
E #x1B[32m 460#x1B[39m #x1B[38;5;28;01mdef#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34msimulate_chopper_cascade_using_tof#x1B[39m(
E #x1B[32m 461#x1B[39m choppers: DiskChoppers[RunType],
E #x1B[32m 462#x1B[39m source_position: Position[snx.NXsource, RunType],
E #x1B[32m (...)#x1B[39m#x1B[32m 468#x1B[39m wmax: SimulationMaxWavelength,
E #x1B[32m 469#x1B[39m ) -> SimulationResults[RunType]:
E #x1B[32m 470#x1B[39m #x1B[38;5;250m #x1B[39m#x1B[33;03m"""#x1B[39;00m
E #x1B[32m 471#x1B[39m #x1B[33;03m Simulate a pulse of neutrons propagating through a chopper cascade using the#x1B[39;00m
E #x1B[32m 472#x1B[39m #x1B[33;03m ``tof`` package (https://scipp.github.io/tof).#x1B[39;00m
E #x1B[32m (...)#x1B[39m#x1B[32m 495#x1B[39m #x1B[33;03m Maximum wavelength of the neutrons in the simulation.#x1B[39;00m
E #x1B[32m 496#x1B[39m #x1B[33;03m """#x1B[39;00m
E #x1B[32m--> #x1B[39m#x1B[32m497#x1B[39m #x1B[38;5;28;01mimport#x1B[39;00m#x1B[38;5;250m #x1B[39m#x1B[34;01mtof#x1B[39;00m
E #x1B[32m 499#x1B[39m tof_choppers = []
E #x1B[32m 500#x1B[39m #x1B[38;5;28;01mfor#x1B[39;00m name, ch #x1B[38;5;129;01min#x1B[39;00m choppers.items():
E
E #x1B[31mModuleNotFoundError#x1B[39m: No module named 'tof'
E In provider ess.reduce.unwrap.lut.simulate_chopper_cascade_using_tof(
E choppers: ess.reduce.nexus.types.DiskChoppers[ess.reduce.nexus.types.AnyRun],
E source_position: ess.reduce.nexus.types.Position[scippnexus.nexus_classes.NXsource, ess.reduce.nexus.types.AnyRun],
E neutrons: ess.reduce.unwrap.lut.NumberOfSimulatedNeutrons,
E pulse_stride: ess.reduce.unwrap.lut.PulseStride[ess.reduce.nexus.types.AnyRun],
E seed: ess.reduce.unwrap.lut.SimulationSeed,
E facility: ess.reduce.unwrap.lut.SimulationFacility,
E wmin: ess.reduce.unwrap.lut.SimulationMinWavelength,
E wmax: ess.reduce.unwrap.lut.SimulationMaxWavelength,
E ) -> ess.reduce.unwrap.lut.SimulationResults[ess.reduce.nexus.types.AnyRun]
.tox/codeshelf-loki/lib/python3.12/site-packages/nbclient/client.py:918: CellExecutionError