Tsjerk / Insane

INSert membrANE - A simple, versatile tool for building coarse-grained simulation systems
GNU General Public License v2.0
39 stars 24 forks source link

Failure when called without arguments #1

Closed jbarnoud closed 7 months ago

jbarnoud commented 8 years ago

Calling insane without arguments leads to a failure with a traceback displayed to the user. Insane should fail more gracefully.

./insane.py
; NDX Solute 1 0
; Charge of protein: 0.000000
; NDX Membrane 1 0
; Charge of membrane: 0.000000
; Total charge: 0.000000
; NDX Solvent 1 0
; NDX System 1 0
; "I mean, the good stuff is just INSANE" --Julia Ormond
Traceback (most recent call last):
  File "./insane.py", line 1914, in <module>
    sys.exit(main())
  File "./insane.py", line 1813, in main
    if options["-o"].value.endswith(".gro"):
AttributeError: 'NoneType' object has no attribute 'endswith'
jbarnoud commented 8 years ago

The issue is actually about -o being mandatory. A missing mandatory should trigger a meaningful error to the final user.

mimischi commented 6 years ago

Don't want to open a new issue for this, so here goes:

Calling the -pbc option with a non-valid parameter, e.g. insane -pbc box, does not produce any error and handles everything silently as if -pbc was not passed.

Tsjerk commented 7 months ago

This was taken care of long ago.