Skip to content

Export with no file name will crash the program #21

@djsunol

Description

@djsunol

Hello,

Thank you for your work on pyDRTtools.

If the Export DRT or Export EIS Regression is used with an empty file name, the program crashes

To replicate:

  • Start pyDRTtools
  • Load a data file (for example \EIS data\csv files\data_1.csv)
  • Click Run Simple, the DRT is successfully created
  • Click Export button for DRT results
  • Do not enter a file name, click Cancel
  • Program crashes

Root cause:
GUI.py line 221 fails if path is empty
image

Potential Fix:
before line 220, add

if Path==''
return

The method export_EIS needs the same check for an empty path. The export_fig method does not crash with an empty path.

Best Regards,
Derek Johnson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions