Skip to content
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

dials.scale exits on error without traceback #1205

Closed
dagewa opened this issue Mar 24, 2020 · 0 comments · Fixed by #1209
Closed

dials.scale exits on error without traceback #1205

dagewa opened this issue Mar 24, 2020 · 0 comments · Fixed by #1209
Assignees

Comments

@dagewa
Copy link
Member

dagewa commented Mar 24, 2020

This is spun out from xia2/xia2#430

export_mtz from command_line/export_mtz.py is treated as library code by dials.scale:

export_mtz(export_params, experiments, [reflection_table])

However a ValueError raised here is caught and the program simply exits, which is confusing

try:
m = export_mtz(reflections[0], experiments, params)
except ValueError as e:
sys.exit(e)

Maybe export_mtz should not be swallowing this ValueError, or/and maybedials.scale should be using dials.util.export_mtz instead.

dagewa added a commit that referenced this issue Mar 25, 2020
Raise exceptions there instead, to be caught in the __main__ block.
Fixes #1205
@dagewa dagewa self-assigned this Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant