Skip to content

Report string ID errors during insertion and stream loading - #432

Closed
M-Colley wants to merge 1 commit into
Toblerity:mainfrom
M-Colley:fix/clear-string-id-errors
Closed

M-Colley wants to merge 1 commit into
Toblerity:mainfrom
M-Colley:fix/clear-string-id-errors

Conversation

@M-Colley

Copy link
Copy Markdown

Fixes #303.

Insert and stream loading now raise TypeError with an integer ID requirement for string IDs. If the stream callback records a Python exception, preserve it when the native bulk loader reports an empty stream. The original two-field example now reports the missing third field, and a three-field record with a string ID reports the ID error.

All four new cases failed on main. With the patch, the unit tests and doctests passed on Windows with libspatialindex 2.1.0 (77 passed, one expected failure). Ruff and mypy passed. The local check also exercised Python, NumPy, and ctypes integer IDs.

@sgillies sgillies closed this Nov 23, 2026
@M-Colley
M-Colley deleted the fix/clear-string-id-errors branch November 23, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow string ids in indexes (or at least improve the error messages)

2 participants