Skip to content

Location names with spaces in location.lst cause station names to parse incorrectly #34

Description

@Ttheegela

Describe the bug
Station names containing spaces (e.g. "Port Louis", "Ko Lak") caused location parsing to fail or return wrong names. Multi-word names split into multiple tokens when parsed with the default C engine, causing row corruption or skipped entries.

Root cause
pd.read_csv with the C engine aborts when whitespace-delimited rows have more tokens than the column name list. Station names with spaces produced extra tokens, breaking the parser.

Fix
Switched to engine='python' with on_bad_lines='skip' to handle multi-word station names correctly.

Fixed in
Commit d4993cb

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions