SPF-OST / pytrnsys_gui

Graphical user interface for pytrnsys
https://pytrnsys.readthedocs.io
GNU Lesser General Public License v3.0
3 stars 4 forks source link

In post-processing, the decoder throws an error when encountering a file a user added themselves. #466

Open ahobeost opened 1 year ago

ahobeost commented 1 year ago

Currently, all files in the temp file are checked to see if they correspond to the desired post-processing step. When a user introduces an excel file (and likely any other file) with a different encoding, this causes post-processing to throw an error.

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 597: character maps to <undefined>

Instead, it would make more sense for post-processing to only check known file types (*.prt, not sure if there are others). Any issue opening such a file should then provide a more meaningful error.

ahobeost commented 1 year ago

pytrnsys/psim/processTrnsysDf -> loadFiles and definedResultsFileToRead fileNameListToRead should use only known file extensions