Support for empty lines
Closed this issue · 5 comments
CarlosBorroto commented
Hi, thanks for putting together this great library. It seems like currently it is not supporting empty lines which the spec allows:
Empty lines or lines that consist entirely of commas and/or whitespace characters are valid, but ignored.
Traceback (most recent call last):
File "/snap/pycharm-community/62/helpers/pydev/pydevd.py", line 1664, in <module>
main()
File "/snap/pycharm-community/62/helpers/pydev/pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/snap/pycharm-community/62/helpers/pydev/pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/snap/pycharm-community/62/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/cborroto/projects/samplesheet/scripts/wdlhelper.py", line 210, in <module>
main()
File "/home/cborroto/projects/samplesheet/scripts/wdlhelper.py", line 205, in main
'summary': summary,
File "/home/cborroto/.pyenv/versions/miniconda3-4.3.30/envs/samplesheet/lib/python3.6/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/home/cborroto/.pyenv/versions/miniconda3-4.3.30/envs/samplesheet/lib/python3.6/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/home/cborroto/.pyenv/versions/miniconda3-4.3.30/envs/samplesheet/lib/python3.6/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "/home/cborroto/projects/samplesheet/scripts/wdlhelper.py", line 39, in launch
sample_sheet = SampleSheet(sample_sheet)
File "/home/cborroto/.pyenv/versions/miniconda3-4.3.30/envs/samplesheet/lib/python3.6/site-packages/sample_sheet/_sample_sheet.py", line 376, in __init__
self._parse(str(self.path))
File "/home/cborroto/.pyenv/versions/miniconda3-4.3.30/envs/samplesheet/lib/python3.6/site-packages/sample_sheet/_sample_sheet.py", line 468, in _parse
header_match = self._section_header_re.match(line[0])
IndexError: list index out of range
CarlosBorroto commented
I just realized this is a duplicate and already fixed. Nevermind. Thanks.
#46
clintval commented
clintval commented
Ha, thanks for the reply! I'll get on the release this week.
clintval commented
Just made the release FYI.
pip install sample_sheet==0.7.0
CarlosBorroto commented
Thanks!