visidata
visidata copied to clipboard
[vds] saving sheet with no rows makes following sheets unreadable
Steps to reproduce with sample data and a .vd
vd sample_data/sample.tsv no.txt sample_data/countries
Then save the sheets with save-all
as unreadable.vds
.
vd unreadable.vds
will give an error.
File "/home/midichef/.local/lib/python3.10/site-packages/visidata/sheets.py", line 285, in loader
for r in self.iterload():
File "/home/midichef/.local/lib/python3.10/site-packages/visidata/loaders/vds.py", line 73, in iterload
raise Exception(d)
Exception: {'name': 'countries'}
The problem is that the .vds format can't specify a sheet with zero rows. The format has no marker for the end of a sheet.
Additional context saul.pw/VisiData v3.1dev