Re: Python-pickle error

2023-05-09 Thread Tony Flury via Python-list
Charles, by your own admission, you deleted your pkl file, And your code doesn't write that pkl file (pickle.dumps(...) doesn't write a file it creates a new string and at no point will it write to the file : What you need is this : import pickle number=2 my_pickled_

Re: Python-pickle error

2023-04-19 Thread Thomas Passin
On 4/19/2023 12:14 PM, charles wiewiora wrote: Hello, I am experincing problems with the pickle moducle the folowing code was working before, import pickle number=2 my_pickeld_object=pickle.dumps(number) print("this is my pickled object",{my_pickeld_object},) with open('file.pkl', 'rb') as file:

Python-pickle error

2023-04-19 Thread charles wiewiora
Hello, I am experincing problems with the pickle moducle the folowing code was working before, import pickle number=2 my_pickeld_object=pickle.dumps(number) print("this is my pickled object",{my_pickeld_object},) with open('file.pkl', 'rb') as file: number=pickle.load(file) my_unpickeled_objec