Skip to content

gem_cat and gemconvert do not handle corrupt GPS strings gracefully. #52

Description

@dannycbowman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions