Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TypeError: can't pickle Struct objects #894

Copy link
Copy link
@dmoore247

Description

@dmoore247
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.