signac-flow icon indicating copy to clipboard operation
signac-flow copied to clipboard

Run command treats warnings as errors, traceback is confusing.

Open bdice opened this issue 4 years ago • 0 comments

Description

I discussed an issue with @jdice where he saw a DeprecationWarning (raised here when job.get_id() is called) being treated as an exception in the run command (exception handling here). DeprecationWarning inherits from Warning, which inherits from Exception, thus deprecation warnings are treated like uncaught errors in the handler for Exception which is undesired behavior.

This specific problem was probably introduced with aggregation in 0.15, and may be resolved by #558, but the underlying problem probably affects all warnings and not just those related to the deprecated job.get_id().

To reproduce

TODO: Create minimal failing example of project.py that manually raises a DeprecationWarning, and see what happens in the traceback (make sure --show-traceback is disabled). Also check to see what happens if a warning is issued followed by an actual error. In my understanding of the problem, this may cause the warning to appear instead of the real error.

Error output

TODO

bdice avatar Aug 02 '21 18:08 bdice