Author malin
Recipients malin, pitrou
Date 2021-06-17.05:05:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If run this code, it will raise an exception: 

    import pickle
    import lzma
    import pandas as pd
    with"test.xz", "wb") as file:
        pickle.dump(pd.DataFrame(range(1_000_000)), file, protocol=5)

The exception:

    Traceback (most recent call last):
      File "E:\", line 7, in <module>
        pickle.dump(pd.DataFrame(range(1_000_000)), file, protocol=5)
      File "D:\Python39\lib\", line 234, in write
        self._pos += len(data)
    TypeError: object of type 'pickle.PickleBuffer' has no len()
The exception is raised in lzma.LZMAFile.write() method:
PickleBuffer doesn't have .__len__ method, is it intended?
Date User Action Args
2021-06-17 05:05:24malinsetrecipients: + malin, pitrou
2021-06-17 05:05:24malinsetmessageid: <>
2021-06-17 05:05:24malinlinkissue44439 messages
2021-06-17 05:05:23malincreate