I observe the following while trying to cancel a running transform (which actually doesn't seem to be running according to the web page):
(.venv) root@ea9c1bef1210:/app# servicex transforms list --running
ServiceX Transforms
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┓
┃ Transform ID ┃ Title ┃ Status ┃ Files ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━┩
│ d40bc41f-9c36-45d6-b5dc-b95a232d7b1e │ muon_data │ Running │ 0 │
│ 72640160-3269-40c8-9e27-bf4613e8e109 │ event_objects │ Running │ 0 │
└──────────────────────────────────────┴───────────────┴─────────┴───────┘
(.venv) root@ea9c1bef1210:/app# servicex transforms cancel d40bc41f-9c36-45d6-b5dc-b95a232d7b1e
╭───────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────────────╮
│ /work/.venv/lib/python3.13/site-packages/servicex/app/transforms.py:217 in cancel │
│ │
│ 214 │ """ │
│ 215 │ sx = ServiceXClient(backend=backend, config_path=config_path, cache_dir=cache_dir) │
│ 216 │ for transform_id in transform_id_list: │
│ ❱ 217 │ │ asyncio.run(sx.cancel_transform(transform_id)) │
│ 218 │ │ print(f"Transform {transform_id} cancelled") │
│ 219 │
│ 220 │
│ │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │ backend = None │ │
│ │ cache_dir = None │ │
│ │ config_path = None │ │
│ │ sx = <servicex.servicex_client.ServiceXClient object at 0x7b7cec974c20> │ │
│ │ transform_id = 'd40bc41f-9c36-45d6-b5dc-b95a232d7b1e' │ │
│ │ transform_id_list = ['d40bc41f-9c36-45d6-b5dc-b95a232d7b1e'] │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.13/asyncio/runners.py:195 in run │
│ │
│ 192 │ │ │ "asyncio.run() cannot be called from a running event loop") ╭───────────────────────────── locals ─────────────────────────────╮ │
│ 193 │ │ debug = None │ │
│ 194 │ with Runner(debug=debug, loop_factory=loop_factory) as runner: │ loop_factory = None │ │
│ ❱ 195 │ │ return runner.run(main) │ main = None │ │
│ 196 │ runner = <asyncio.runners.Runner object at 0x7b7cec885f90> │ │
│ 197 ╰──────────────────────────────────────────────────────────────────╯ │
│ 198 def _cancel_all_tasks(loop): │
│ │
│ /usr/local/lib/python3.13/asyncio/runners.py:89 in run │
│ │
│ 86 │ def run(self, coro, *, context=None): ╭────────────────────────── locals ───────────────────────────╮ │
│ 87 │ │ """Run a coroutine inside the embedded event loop.""" │ context = None │ │
│ 88 │ │ if not coroutines.iscoroutine(coro): │ coro = None │ │
│ ❱ 89 │ │ │ raise ValueError("a coroutine was expected, got {!r}".format(coro)) │ self = <asyncio.runners.Runner object at 0x7b7cec885f90> │ │
│ 90 │ │ ╰─────────────────────────────────────────────────────────────╯ │
│ 91 │ │ if events._get_running_loop() is not None: │
│ 92 │ │ │ # fail fast with short traceback │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: a coroutine was expected, got None
I observe the following while trying to cancel a running transform (which actually doesn't seem to be running according to the web page):