Skip to content

BUG: Unpacking PY2 msgpack in PY3 #12142

Closed
@kawochen

Description

@kawochen

In #10686, I should have made all the strings in encode Unicode strings. Now 'abc' packed in P2 becomes (or rather remains as) b'abc' when unpacked in P3. This I think is the desired behavior (bytes remain as bytes and text remains as text), but it causes errors in decode, because, for example, 'typ' (==u'type' in P2) is expected while b'typ' (=='typ' in P2) is the key.

Reading in the other direction is fine because P2 is more tolerant of these things.

To reproduce this,

(P2) python generate_legacy_storage_files.py your_dir msgpack
(P3) pandas.read_msgpack(the_file_just_created)

Metadata

Metadata

Assignees

No one assigned

    Labels

    UnicodeUnicode strings

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions