reilleya / openMotor

An open-source internal ballistics simulator for rocket motor experimenters
GNU General Public License v3.0
361 stars 71 forks source link

Bug - Tried to import a "ENG" file instead of a BSX file #183

Closed benrussell11 closed 3 years ago

benrussell11 commented 3 years ago

Ya I know, stupid user error. However system shouldn't have errored out with an exception. Using version 0.5.0 from Stage. Suggest a friendly user pop up message indicating ENG file type are not supported and the exception should include the version.

C:\openMotor>python main.py 0.0000 [LOG] ################################################################################ 0.0000 [LOG] Application started at 2021-02-10T14:29:34.662249 0.7340 [LOG] Starting new motor file 0.7340 [LOG] Opening window QLayout: Attempting to add QLayout "" to MotorEditor "motorEditor", which already has a layout 1.0150 [LOG] Window opened 99.4840 [ERR] Traceback (most recent call last): 99.4840 [ERR] File "C:\openMotor\uilib\converter.py", line 85, in exec 99.4840 [ERR] self.doConversion(path) 99.4840 [ERR] File "C:\openMotor\uilib\converters\burnsimImporter.py", line 61, in doConversion 99.4840 [ERR] tree = ET.parse(path) 99.4840 [ERR] File "C:\Users\ben\AppData\Local\Programs\Python\Python37-32\lib\xml\etree\ElementTree.py", line 1197, in parse 99.4840 [ERR] tree.parse(source, parser) 99.5000 [ERR] File "C:\Users\ben\AppData\Local\Programs\Python\Python37-32\lib\xml\etree\ElementTree.py", line 598, in parse 99.5000 [ERR] self._root = parser._parse_whole(source) 99.5000 [ERR] File "", line None 99.5000 [ERR] xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0 99.5000 [ERR] 99.5000 [LOG] Application closed due to exception.

Ben

reilleya commented 3 years ago

Nice catch, looks like I should put some error handling in here.