Home Forums Nazca Questions and Answers Bug in nazca.colormap.lyp2csv()

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6824
    EStew42
    Participant

    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

    #6881
    StefvU
    Participant

    Hello Evan,

    Thank you for reporting this issue.
    We have noted it and will include a fix in a future Nazca release.

    Best regards,
    Stef

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.