Open 7yl4r opened 6 years ago
This is still an issue and it can be easily resolved by modifying the hardcoded regex signatures:
In my testing I found:
RAW_DG
string will always fail because snsr
is not in that regex and thus cannot be captured. Then sat
will remain None
, and a TypeError
will raise on sat.upper()
RENAMED_DG
string contains a very strange time string with length of 9 digits. DDHHMMSS
is only 8 digits so I don't know what the last digit is supposed to be. We only got things working by adding a 0.The extraction of metadata from filenames should be reworked here. As is it is non-standard, undocumented, and non-configurable.
Additionally: the sat
information should probably just be read from the .xml file so we don't even need to worry about the filename.
I was quite surprised to find that this error I was seeing is due to a filenaming issue.
utils.get_sensor returns
vendor=None
if the input filename does not match the regexes there. This causes a function to return 1 later when checking for vendor.Ideally
vendor
andsensor
could be passed in a CLI args, but I can see that would be a bigger refactor than I want to put in right now. At a minimum I would expectget_sensor
throws an exception or a more informative error message is shown when the filename doesn't match.