Test fails for aiida-core v2.7.0 with InstalledCode

Dear all,
I am writing as I am not sure how to solve the problem I am facing. The test test_run of the file workflows/test_ase.py of aiida-phonopy is failing with the following error:

test_ase.py::test_run 07/15/2025 09:06:04 AM <55310> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [25|PhonopyAseWorkChain|run_forces]: submitting `PythonJob` <PK=31> with supercell n.o 1
07/15/2025 09:06:06 AM <55310> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [25|PhonopyAseWorkChain|run_phonopy]: submitting `PhonopyCalculation` <PK=40>
07/15/2025 09:06:07 AM <55310> aiida.engine.transports: [ERROR] Exception whilst using transport:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/aiida/engine/transports.py", line 106, in request_transport
    yield transport_request.future
  File "/opt/conda/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 372, in do_stash
    return await execmanager.stash_calculation(node, transport)
  File "/opt/conda/lib/python3.10/site-packages/aiida/engine/daemon/execmanager.py", line 455, in stash_calculation
    target_base = Path(stash_options['target_base'])
KeyError: 'target_base'

07/15/2025 09:06:07 AM <55310> aiida.orm.nodes.process.calculation.calcjob.CalcJobNode: [ERROR] iteration 1 of do_stash excepted, retrying after 20 seconds
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/aiida/engine/utils.py", line 205, in exponential_backoff_retry
    result = await coro()
  File "/opt/conda/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 372, in do_stash
    return await execmanager.stash_calculation(node, transport)
  File "/opt/conda/lib/python3.10/site-packages/aiida/engine/daemon/execmanager.py", line 455, in stash_calculation
    target_base = Path(stash_options['target_base'])
KeyError: 'target_base'

I honestly don’t understand why, as it was not happening before. I guess something has changed with the InstalledCode.

Do you have any pointer on how to solve this?

Many thanks for any help.
Lorenzo

In case you’d like to inspect the CI tests: Deps: fix phonopy and aiida-core latest version changes · aiida-phonopy/aiida-phonopy@42a7abf · GitHub

Perhaps a question for @ali-khosravi?

Sounds like we have a bug.
@bastonero can you please specify what’s the workflow you’re running?
If it includes stashing operation through
metadata.option.stash
or
it uses something like calc_info.skip_submit = True in the workflow.

THanks!

@bastonero

I really don’t understand how’s this happening
Somehow task_stash_job is being called, while you don’t have any stash or whatsoever defined.
This should not happen, because we already have a measure for that:

I feel like, this bug is induced by plumpy magical hands :raising_hands:

To examine that, can try to see if you can reproduced it with this possible fix I just pushed:
515a6fb

Edit try this branch instead:

Please let me know if this works!
Cheers and sorry for the inconvenience!
Ali

Hi @ali-khosravi, the tests and the executable notebooks of the documentation now all pass correctly using the support branch! Many thanks!

Are you going to do a patch release? Let me know, so I can keep an eye on it and release also the corresponding aiida-phonopy working version.

Cheers

Perfect!
Thanks @bastonero, we’ll soon release 2.7.1 with this fix.

In the end, it sees task_stash_job is being triggered even though no stash options are defined.

The reason appeared to be that sometimes node.get_option('stash') returns an empty dictionary instead of None. Which the reason of that itself is unknown to us.

Our guess is that, It has something to do with way builder stores that info.
To be investigated, – of course this is independent to the patch release!

1 Like

We published a patch release v2.7.1 with the fix. I hope this fixes your problems for now. Let us know if the issue still remains

1 Like