zaneveld / karenina

Simulation and modeling tools for studying Anna Karenina effects in animal microbiomes
2 stars 6 forks source link

Display Help Text When Run Without Parameters #21

Closed hoikincheng closed 6 years ago

hoikincheng commented 6 years ago

When karenina is run without parameters, it displays an obscure error rather than displaying help with text.

Command: python spatial_ornstein_uhlenbeck.py

Output: {'output': None, 'pert_file_path': '/karenina/data/perturbations/set_xyz_lambda_zero.tsv', 'treatment_names': 'control,destabilizing_treatment', 'n_individuals': '35,35', 'n_timepoints': 10, 'perturbation_timepoint': 5, 'perturbation_duration': 100, 'interindividual_variation': 0.01, 'delta': 0.25, 'L': 0.2, 'fixed_start_pos': None} Traceback (most recent call last): File "spatial_ornstein_uhlenbeck.py", line 271, in main() File "spatial_ornstein_uhlenbeck.py", line 230, in main write_options_to_log("log.txt", opts) File "spatial_ornstein_uhlenbeck.py", line 116, in write_options_to_log logfile = open(join(opts.output, log),"w+") File "/miniconda3/lib/python3.6/posixpath.py", line 78, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType

SLPeoples commented 6 years ago

This issue was resolved with #24.