You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if one forgets to give the -o flag to neurom check, it results in a crash which does not really tell the user what they've done wrong:
$ neurom check A1-May29-IR2-3-G.ASC
ERROR:neurom.check.runner: Has axon FAIL
ERROR:neurom.check.runner: Has nonzero soma radius FAIL
ERROR:neurom.check.runner: ALL FAIL
Traceback (most recent call last):
File "/usr/bin/neurom", line 8, in <module>
sys.exit(cli())
File "/usr/lib/python3.10/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.10/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/neurom/apps/cli.py", line 113, in check
morph_check.main(datapath, config, output)
File "/usr/lib/python3.10/site-packages/neurom/apps/morph_check.py", line 51, in main
with open(output, 'w') as json_output:
TypeError: expected str, bytes or os.PathLike object, not NoneType
However, looking at the --help text, it isnt' clear that the -o flag is necessary:
$ neurom check --help
Usage: neurom check [OPTIONS] DATAPATH
Cli for apps/morph_check.
Options:
-C, --config FILE Configuration File [default: /usr/lib/python3.10/site-
packages/neurom/apps/config/morph_check.yaml]
-o, --output FILE Path to output json summary file
--help Show this message and exit.
because the -C flag isn't necessary---it falls back to the default config file.
So, if the the -o flag is necessary, the command should not run at all if it isn't set. Another option is to just print the output to stdout if the flag is not set, but then that means that the flag is not necessary.
The text was updated successfully, but these errors were encountered:
Currently if one forgets to give the
-o
flag toneurom check
, it results in a crash which does not really tell the user what they've done wrong:However, looking at the
--help
text, it isnt' clear that the-o
flag is necessary:because the
-C
flag isn't necessary---it falls back to the default config file.So, if the the
-o
flag is necessary, the command should not run at all if it isn't set. Another option is to just print the output to stdout if the flag is not set, but then that means that the flag is not necessary.The text was updated successfully, but these errors were encountered: