fix: replace broken documentation URLs in error messages (#2533)

Replaces broken 404 URL and unhelpful documentation links in type error
messages with working URL and inline list of supported data types.

**Before**: Points to
https://lancedb.github.io/lance/read_and_write.html (404 error)
**After**: Lists supported types inline and points to
https://lancedb.github.io/lancedb/guides/tables/
This commit is contained in:
Tristan Zajonc
2025-07-24 12:30:27 -07:00
committed by GitHub
parent 3cd7dd3375
commit b9e3c36d82
2 changed files with 6 additions and 6 deletions

View File

@@ -94,9 +94,9 @@ def data_to_reader(
else:
raise TypeError(
f"Unknown data type {type(data)}. "
"Please check "
"https://lancedb.github.io/lance/read_and_write.html "
"to see supported types."
"Supported types: list of dicts, pandas DataFrame, polars DataFrame, "
"pyarrow Table/RecordBatch, or Pydantic models. "
"See https://lancedb.github.io/lancedb/guides/tables/ for examples."
)

View File

@@ -165,9 +165,9 @@ def _into_pyarrow_reader(data) -> pa.RecordBatchReader:
else:
raise TypeError(
f"Unknown data type {type(data)}. "
"Please check "
"https://lancedb.github.io/lancedb/python/python/ "
"to see supported types."
"Supported types: list of dicts, pandas DataFrame, polars DataFrame, "
"pyarrow Table/RecordBatch, or Pydantic models. "
"See https://lancedb.github.io/lancedb/guides/tables/ for examples."
)