You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think debugging would be easier for new users (also in general) if there was consistent erring behavior on the drivers instrument_id property. For example, the KaguyaTC Driver just fails:
Trying <class 'ale.drivers.selene_drivers.KaguyaTcPds3NaifSpiceDriver'>
Failed: 'INSTRUMENT_ID'
Traceback (most recent call last):
File "/work/users/ladoramkershner/projects/ale/ale/drivers/__init__.py", line 127, in load
res.instrument_id
File "/work/users/ladoramkershner/projects/ale/ale/drivers/selene_drivers.py", line 79, in instrument_id
instrument = super().instrument_id
File "/work/users/ladoramkershner/projects/ale/ale/base/label_pds3.py", line 33, in instrument_id
return self.label['INSTRUMENT_ID']
File "/home/ladoramkershner/miniconda3/envs/isis6_ale/lib/python3.6/site-packages/pvl/collections.py", line 175, in __getitem__
return dict_getitem(self, key)[0]
KeyError: 'INSTRUMENT_ID'
Trying <class 'ale.drivers.viking_drivers.VikingIsisLabelIsisSpiceDriver'>
Where as the Viking Drivers actually raises an exception:
Failed: Instrument ID [MRFLRO] is wrong.
Traceback (most recent call last):
File "/work/users/ladoramkershner/projects/ale/ale/drivers/__init__.py", line 127, in load
res.instrument_id
File "/work/users/ladoramkershner/projects/ale/ale/drivers/viking_drivers.py", line 137, in instrument_id
raise Exception (f'Instrument ID [{instrument_id}] is wrong.')
Exception: Instrument ID [MRFLRO] is wrong.
Trying <class 'ale.drivers.mess_drivers.MessengerMdisIsisLabelIsisSpiceDriver'>
Failed: 'MRFLRO'
I also think a more specific exception message might be helpful ('Instrument ID found on the input label [INSTRUMENT_ID], does not match this drivers available instrument ids').
Finally, trailing vertical space after the Exception would allow for more intuitive reading experience. Right now the Traceback stack butts up against the beginning prints of the next driver trial. So the previous two examples would print out as follows:
Trying <class 'ale.drivers.selene_drivers.KaguyaTcPds3NaifSpiceDriver'>
Failed: 'INSTRUMENT_ID'
Traceback (most recent call last):
File "/work/users/ladoramkershner/projects/ale/ale/drivers/__init__.py", line 127, in load
res.instrument_id
File "/work/users/ladoramkershner/projects/ale/ale/drivers/selene_drivers.py", line 79, in instrument_id
instrument = super().instrument_id
File "/work/users/ladoramkershner/projects/ale/ale/base/label_pds3.py", line 33, in instrument_id
return self.label['INSTRUMENT_ID']
File "/home/ladoramkershner/miniconda3/envs/isis6_ale/lib/python3.6/site-packages/pvl/collections.py", line 175, in __getitem__
return dict_getitem(self, key)[0]
KeyError: 'INSTRUMENT_ID'
Trying <class 'ale.drivers.viking_drivers.VikingIsisLabelIsisSpiceDriver'>
Failed: Instrument ID [MRFLRO] is wrong.
Traceback (most recent call last):
File "/work/users/ladoramkershner/projects/ale/ale/drivers/__init__.py", line 127, in load
res.instrument_id
File "/work/users/ladoramkershner/projects/ale/ale/drivers/viking_drivers.py", line 137, in instrument_id
raise Exception (f'Instrument ID [{instrument_id}] is wrong.')
Exception: Instrument ID [MRFLRO] is wrong.
Trying <class 'ale.drivers.mess_drivers.MessengerMdisIsisLabelIsisSpiceDriver'>
Failed: 'MRFLRO'
The text was updated successfully, but these errors were encountered:
ALE is very hairy. I just ran into similar issues and took hours and dozens of print statements to nail where the error was. I made a pull request at #455, which may help a little towards the goal of clearing things up, though there's likely a lot more to do.
I think debugging would be easier for new users (also in general) if there was consistent erring behavior on the drivers instrument_id property. For example, the KaguyaTC Driver just fails:
Where as the Viking Drivers actually raises an exception:
I also think a more specific exception message might be helpful ('Instrument ID found on the input label [INSTRUMENT_ID], does not match this drivers available instrument ids').
Finally, trailing vertical space after the Exception would allow for more intuitive reading experience. Right now the Traceback stack butts up against the beginning prints of the next driver trial. So the previous two examples would print out as follows:
The text was updated successfully, but these errors were encountered: