Hello, I’ve found a bug in the nazca.colormap.lyp2csv() function in the case when the .lyp file is a single-tab file. Line 196 of colormap.py:
else: #
if infolevel > 0:
print('Single tab found')
tab, df = _parse_tab(lev1, infolevel=infolevel)
csv_filename = "{}_{}.csv".format(lypfile[:-4], tab)
df.to_csv(csv_filename, index=False, na_rep='')
tabs[tab] = csv_filename
The code will never run if infolevel == 0, also the variable lev1 is not defined here. I believe that lines after the print statement should be un-indented and ‘lev1’ should be replaced with ‘root’ as follows:
else: #
if infolevel > 0:
print('Single tab found')
tab, df = _parse_tab(root, infolevel=infolevel)
csv_filename = "{}_{}.csv".format(lypfile[:-4], tab)
df.to_csv(csv_filename, index=False, na_rep='')
tabs[tab] = csv_filename
This code seems to run fine.
Let me know if I should report this somewhere else. GitHub?
-Evan