Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cascading Search Meaningful Error Messages #19

Open
Jack-Hayes opened this issue Nov 8, 2024 · 2 comments
Open

Cascading Search Meaningful Error Messages #19

Jack-Hayes opened this issue Nov 8, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@Jack-Hayes
Copy link
Member

11/08/2024
Custom Python environment 3.12.5
Coincident version: '0.1.dev40+gfa66db4.d20241108'

cascading_search returns ValueError ValueError: ItemCollection is empty, cannot convert to GeoDataFrame when a one of the datasets in secondary_datasets doesn't return a 'hit'.
Returns TypeError unsupported operand type(s) for *: 'GeometryArray' and 'float' when the overlapping datasets in the search don't meet the min_overlap_area minimum. ie. when geographic_area() returns an empty gdf due to datasets not meeting minimum area constraint, subset_by_minimum_area() raises the error

@Jack-Hayes Jack-Hayes added the documentation Improvements or additions to documentation label Nov 8, 2024
@scottyhq scottyhq added the good first issue Good for newcomers label Nov 21, 2024
@scottyhq
Copy link
Member

Thanks for digging into this @Jack-Hayes ! I'd say it's really 2 separate issues.

cascading_search returns ValueError ValueError: ItemCollection is empty, cannot convert to GeoDataFrame when a one of the datasets in secondary_datasets doesn't return a 'hit'.

Do you think it's better to just clarify the error message by including the dataset name without hits? Or warn instead and proceed to the next secondary dataset?

TypeError unsupported operand type(s) for *: 'GeometryArray' and 'float' when the overlapping datasets in the search don't meet the min_overlap_area minimum. ie. when geographic_area() returns an empty gdf due to datasets not meeting minimum area constraint, subset_by_minimum_area() raises the error

Agreed we want to avoid that confusing error. Would you prefer to just return the empty geodataframe or raise a more informative ValueError for this case?

@Jack-Hayes
Copy link
Member Author

For

cascading_search returns ValueError ValueError: ItemCollection is empty, cannot convert to GeoDataFrame when a one of the datasets in secondary_datasets doesn't return a 'hit'.

Do you think we could implement a warning message displaying the dataset name without hits as well as returning only the gdfs with hits? I think if I had to pick between the two I would rather clarify the error message by including the dataset name without hits!

For

TypeError unsupported operand type(s) for *: 'GeometryArray' and 'float' when the overlapping datasets in the search don't meet the min_overlap_area minimum. ie. when geographic_area() returns an empty gdf due to datasets not meeting minimum area constraint, subset_by_minimum_area() raises the error

I think a more informative ValueError would be best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
Status: Todo
Development

No branches or pull requests

2 participants