Open vpipkt opened 4 years ago
Got this more detailed partial stack trace:
Py4JJavaError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/IPython/core/formatters.py in __call__(self, obj)
339 pass
340 else:
--> 341 return printer(obj)
342 # Finally look for special method names
343 method = get_real_method(obj, self.print_method)
/opt/conda/lib/python3.7/site-packages/pyrasterframes/rf_ipython.py in spark_df_to_html(df, num_rows, truncate)
209 def spark_df_to_html(df: DataFrame, num_rows: int = 5, truncate: bool = False) -> str:
210 from pyrasterframes import RFContext
--> 211 return RFContext.active().call("_dfToHTML", df._jdf, num_rows, truncate)
212
213
/opt/conda/lib/python3.7/site-packages/pyrasterframes/rf_context.py in call(name, *args)
88 def call(name, *args):
89 f = RFContext.active().lookup(name)
---> 90 return f(*args)
91
92 @staticmethod
/opt/conda/lib/python3.7/site-packages/py4j/java_gateway.py in __call__(self, *args)
1255 answer = self.gateway_client.send_command(command)
1256 return_value = get_return_value(
-> 1257 answer, self.gateway_client, self.target_id, self.name)
1258
1259 for temp_arg in temp_args:
/opt/conda/lib/python3.7/site-packages/pyspark/sql/utils.py in deco(*a, **kw)
61 def deco(*a, **kw):
62 try:
---> 63 return f(*a, **kw)
64 except py4j.protocol.Py4JJavaError as e:
65 s = e.java_exception.toString()
/opt/conda/lib/python3.7/site-packages/py4j/protocol.py in get_return_value(answer, gateway_client, target_id, name)
326 raise Py4JJavaError(
327 "An error occurred while calling {0}{1}{2}.\n".
--> 328 format(target_id, ".", name), value)
329 else:
330 raise Py4JError(
Py4JJavaError: An error occurred while calling o61._dfToHTML.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 3 in stage 15.0 failed 1 times, most recent failure: Lost task 3.0 in stage 15.0 (TID 1145, localhost, executor driver): java.lang.ClassCastException: java.lang.Double cannot be cast to org.apache.spark.sql.catalyst.InternalRow
at org.locationtech.rasterframes.expressions.package$.row(package.scala:46)
at org.locationtech.rasterframes.expressions.UnaryRasterOp$class.nullSafeEval(UnaryRasterOp.scala:41)
at org.locationtech.rasterframes.expressions.transformers.RenderPNG.nullSafeEval(RenderPNG.scala:38)
Turns out that this is due to the appearance of Null values in the tile column.
@metasim I don't really understand how this is working in the Expressions. I would have thought the UnaryExpression.eval
would have returned the null so that the nullSafeEval
would not be called with a null argument...
This may point to an issue in one of the functions like
rf_render_png