-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
process_state
can be None
when we attempt to probe it
#6682
Comments
This is the @property
def process_state(self) -> Optional[ProcessState]:
"""Return the process state
:returns: the process state instance of ProcessState enum
"""
state = self.base.attributes.get(self.PROCESS_STATE_KEY, None)
if state is None:
return state
return ProcessState(state) From plumpy point of view, when the process object (process in runner) created, it automatically enters into the create state so in principle the process_state of object cannot be |
To be clear, this issue is not about if |
Describe the bug
In
aiida.cmdline.utils.ascii_vis.calc_info
, we attemptnode.process_state.value.capitalize()
. However,process_state
may beNone
, in which case this will except.Steps to reproduce
See aiidalab/aiidalab-widgets-base#657 for details.
I suppose try calling the utility immediately after starting a process.
Expected behavior
Obtaining the process state if available.
Your environment
AiiDAlab container (
aiidalab/full-stack:latest
image)Comments
I believe
node.process_state.value.capitalize()
is already available vianode.process_state.name
The text was updated successfully, but these errors were encountered: