tlubitz / SBtab

SBtab - Table format for Systems Biology:
www.sbtab.net
MIT License
6 stars 8 forks source link

bug when there are no rows starting with "!" #113

Closed eladnoor closed 3 years ago

eladnoor commented 3 years ago

The function misc.check_delimiter https://github.com/tlubitz/SBtab/blob/049ff30535c1afaee3095fba400e42affda8c271/python/misc.py#L71 returns False if there are no lines starting with a single !. This later creates an exception which is very difficult to interpret:

sbtab.SBtab.SBtabError: The SBtab could not be generated: The SBtab Table object could not be created properly: replace() argument 1 must be str, not bool

Instead, I think we can just set a default delimiter in case it's hard to guess what it is from the file itself.

tlubitz commented 3 years ago

Good idea!

I'll take care of it this week.