Open kannes opened 5 years ago
I get my code is broken, but the error it triggered is one (probably unrelated) in piexif code :)
You can't use floats. The numbers for these fields are treated as Rationals, and need to either be integral or a (numerator, denominator) tuple.
Error is cryptic, I agree, because the if-elif chain doesn't have a else that raises a ValueError.
Ah, that makes sense. Thanks!
I have the same error with some gps coordinates like these:
{1: 'N', 2: ((44, 1), (30, 1), (2997, 100)), 3: 'E', 4: ((11, 1), (21, 1), (5991, 100)), 5: 0, 6: (324663, 12176), 12: 'K', 13: (3083, 4231), 16: 'T', 17: (406646, 1481), 23: 'T', 24: (406646, 1481), 31: '24/1'}
The problem is with '24/1' value. These coordinates are automatically created by a digital camera, so i can't handle them.
I think that the better thing should be fixing the code to handle an else statement that doesn't break anything..the problem is that i don't know what should be a safe default value for new_value.
An empty string should be ok?
Use latlons in following formats ((degress, 1), (minutes, 1), (seconds, 10000))
piexif-1.1.2
errors as