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

save_result(JSON) on aggregate_spatial result doesn't work #448

Closed
soxofaan opened this issue Jul 14, 2023 · 1 comment
Closed

save_result(JSON) on aggregate_spatial result doesn't work #448

soxofaan opened this issue Jul 14, 2023 · 1 comment

Comments

@soxofaan
Copy link
Member

soxofaan commented Jul 14, 2023

This works

aggregates = cube.aggregate_spatial(geometries=point_collection, reducer="mean")
aggregates.download("tmp.json")

But adding an explicit save_result fails:

aggregates = cube.aggregate_spatial(geometries=point_collection, reducer="mean")
result = aggregates.save_result(format="JSON")
result.download("tmp.json")

->

OpenEoApiError: [500] Internal: Server error: TypeError('Object of type AggregateSpatialResultCSV is not JSON serializable') (ref: r-470fdd4b75754f288153c821b7f2c1f9)
@soxofaan
Copy link
Member Author

soxofaan commented Jul 14, 2023

Ok found it, it's a client issue:

aggregate_spatial returns a VectorCube, which blindly adds save_result from .download():
#401

@soxofaan soxofaan transferred this issue from Open-EO/openeo-geopyspark-driver Jul 14, 2023
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

No branches or pull requests

1 participant