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

load_result failure #127

Open
soxofaan opened this issue Feb 24, 2022 · 4 comments
Open

load_result failure #127

soxofaan opened this issue Feb 24, 2022 · 4 comments

Comments

@soxofaan
Copy link
Member

originally reported here https://discuss.eodc.eu/t/caching-openeo-results/197/22 and related to #126

synchronous download of a process graph with load_result results in

OpenEoApiError: [500] unknown: / by zero
@soxofaan
Copy link
Member Author

soxofaan commented Feb 24, 2022

I could reproduce this with a NetCDF download attempt and found this in logs:

22/02/24 15:58:22 INFO netcdf.NetCDFRDDWriter$: Writing NetCDF from rdd with : 0 elements and 0 partitions.
22/02/24 15:58:22 INFO netcdf.NetCDFRDDWriter$: Writing NetCDF from rdd with : 0 elements and 0 partitions.
....
  File ".../site-packages/openeo_driver/save_result.py", line 81, in save_result
    return self.cube.save_result(filename=filename, format=self.format, format_options=self.options)
  File ".../site-packages/openeogeotrellis/geopysparkdatacube.py", line 1356, in save_result
    result = self.write_assets(filename, format, format_options)
  File ".../site-packages/openeogeotrellis/geopysparkdatacube.py", line 1599, in write_assets
    asset_paths = self._get_jvm().org.openeo.geotrellis.netcdf.NetCDFRDDWriter.saveSingleNetCDF(max_level.srdd.rdd(),
  File "../lib/py4j-0.10.9.2-src.zip/py4j/java_gateway.py", line 1309, in __call__
    return_value = get_return_value(
  File ".../lib/py4j-0.10.9.2-src.zip/py4j/protocol.py", line 326, in get_return_value
    raise Py4JJavaError(
py4j.protocol.Py4JJavaError: An error occurred while calling z:org.openeo.geotrellis.netcdf.NetCDFRDDWriter.saveSingleNetCDF.
: java.lang.ArithmeticException: / by zero
	at org.openeo.geotrellis.netcdf.NetCDFRDDWriter$.saveSingleNetCDF(NetCDFRDDWriter.scala:144)
	at org.openeo.geotrellis.netcdf.NetCDFRDDWriter.saveSingleNetCDF(NetCDFRDDWriter.scala)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
	at py4j.Gateway.invoke(Gateway.java:282)
	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
	at py4j.commands.CallCommand.execute(CallCommand.java:79)
	at py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java:182)
	at py4j.ClientServerConnection.run(ClientServerConnection.java:106)
	at java.base/java.lang.Thread.run(Thread.java:834)

@soxofaan
Copy link
Member Author

minimal example to reproduce: https://gist.github.com/soxofaan/b69c54acc51a36f47b9284da2ca04e8e

@soxofaan
Copy link
Member Author

(internal ref: EP-4165)

@jdries
Copy link
Contributor

jdries commented Feb 25, 2022

Cause is quite clearly an empty data cube:
https://github.com/Open-EO/openeo-geotrellis-extensions/blob/feature/spark3/openeo-geotrellis/src/main/scala/org/openeo/geotrellis/netcdf/NetCDFRDDWriter.scala#L144

So we clearly need a better error, or an empty netcdf file.

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

2 participants