Open agoscinski opened 1 month ago
I am not sure if this is really a bug as such. The code actually works and the error is correct. I think just that rather than it being an error, the message should be a warning. The message is actually correct: since the workchain class cannot be imported, it cannot be persisted, which normally would be a problem. In this case it is expected though. The fact that it wouldn't be able to be restarted is anyway not relevant since we are running it (and not submitting) where restarts are anyway not supported.
I am not sure if there is anything we can do to hide the warning in this case. We don't want to hide it by default because in certain cases it not being persistable could be a real problem. We could just add some code in the tutorial script to silence this warning, but that would also be quite "ugly" which will confuse the user.
So not quite sure what to do here...
Steps to reproduce
Using code snippets that are available Tutorial, the How-To Guides and Topics in the aiida-core readthedocs I end up with this file to create a simple WorkChain.
With
verdi run
it runs but outputs this error messageDescribe the bugs / Expected behavior
Here the whole log verdi_run_out.txt. One solution is to create a dedicated file for the WorkChain class and import it, but this is not clear from the documentation that this can be done. Ideally, running everything from one file should be also supported with
verdi run
, or at least be understandable communicated to the user that it does not work suggesting a solution.Running the script within a
verdi shell
or jupyter notebook pipes the error to the process report which is also not good, since the user is not informed about theA smaller issue here is that the whole error log as well as the print output results from the actual result at the endhas been piped to stdout. There should be distinguishment between the error and output
Your environment