lucianopaz / compress_pickle

Standard python pickle, thinly wrapped with standard compression libraries
MIT License
41 stars 10 forks source link

_lzma.LZMADecompressor' object has no attribute 'needs_input #29

Closed harirajeev closed 2 years ago

harirajeev commented 3 years ago

compress_pickle.load("at.lzma", compression="lzma")

Is throwing an error

AttributeError: '_lzma.LZMADecompressor' object has no attribute 'needs_input

Running on Python 3.8 in a Linux machine

Have you faced this issue before ?

lucianopaz commented 3 years ago

Hi @harirajeev, I’ve never seen that message. Could you post the full traceback? From the error message itself I can’t see where this is coming from

harirajeev commented 3 years ago

Hi @lucianopaz , thank you for the response. Please find below a screen shot of the error.

20210329_225330

lucianopaz commented 3 years ago

@harirajeev, I couldn't reproduce the problem. Could you try and see if the following loads your file's contents?

with open("at.lzma", "r") as f:
    buff = f.read()
obj = pickle.loads(buff)
print(obj)

If that raises an error, then your problem must be caused by something else. The only thing I can think of is that there is some problem revolving around the virtual environment you created and installed compress_pickle into.

lucianopaz commented 2 years ago

I'll close because I couldn't reproduce the error and it's been a long time without any response.