If a corrupt GPS string contains a non UTF-8 character, both gem_cat and gemconvert fail with a very generalized error message. Claude suggested:
Added encoding handling — Changed all pd.read_csv() calls to use encoding='latin-1' (more forgiving than UTF-8) and on_bad_lines='skip' to skip malformed lines instead of crashing.
Improved error messages — Updated the main() exception handler to print the actual error message and full traceback, so debugging is possible in the future.
That seemed to fix the problem on my end but I am not sure if you want to handle it a different way.
Offending file is attached - see line 563672
example.txt
If a corrupt GPS string contains a non UTF-8 character, both gem_cat and gemconvert fail with a very generalized error message. Claude suggested:
Added encoding handling — Changed all pd.read_csv() calls to use encoding='latin-1' (more forgiving than UTF-8) and on_bad_lines='skip' to skip malformed lines instead of crashing.
Improved error messages — Updated the main() exception handler to print the actual error message and full traceback, so debugging is possible in the future.
That seemed to fix the problem on my end but I am not sure if you want to handle it a different way.
Offending file is attached - see line 563672
example.txt