forked from MostAwesomeDude/construct
-
Notifications
You must be signed in to change notification settings - Fork 165
Closed
Labels
Description
Using construct v 2.10.56:
from construct import PaddedString, Struct, Int32un
from pyspark import cloudpickle
fundus_header = Struct(
'width' / Int32un,
'height' / Int32un,
'bits_per_pixel' / Int32un,
'number_slices' / Int32un,
'unknown' / PaddedString(4, 'ascii'),
'size' / Int32un,
# 'img' / Int8un,
)
cloudpickle.dumps(fundus_header)
fails with TypeError: can't pickle Struct objects
Fixing this will let us use this in Spark UDFs.