About 23,000,000 results
Open links in new tab
  1. python - How to read pickle file? - Stack Overflow

    The following is an example of how you might write and read a pickle file. Note that if you keep appending pickle data to the file, you will need to continue reading from the file until you find …

  2. How can I use pickle to save a dict (or any other Python object)?

    I have looked through the information that the Python documentation for pickle gives, but I'm still a little confused. What would be some sample code that would write a new file and then use …

  3. python - Save Numpy Array using Pickle - Stack Overflow

    But that shouldn't be surprising - you can't read a freshly opened write file. It will be empty. np.save/load is the usual pair for writing numpy arrays. But pickle uses save to serialize …

  4. Saving and loading objects and using pickle - Stack Overflow

    It seems you want to save your class instances across sessions, and using pickle is a decent way to do this. However, there's a package called klepto that abstracts the saving of objects to a …

  5. Why do I get "Pickle - EOFError: Ran out of input" reading an …

    31 It is very likely that the pickled file is empty. It is surprisingly easy to overwrite a pickle file if you're copying and pasting code. For example the following writes a pickle file:

  6. Not able to pip install pickle in python 3.6 - Stack Overflow

    pickle module is part of the standard library in Python for a very long time now so there is no need to install it via pip. I wonder if you IDE or command line is not messed up somehow so that it …

  7. Using pickle.dump - TypeError: must be str, not bytes

    0 pickle uses a binary protocol, hence only accepts binary files. As said in the first sentence, "The pickle module implements binary protocols for serializing and de-serializing".

  8. pickle - Python pickling after changing a module's directory

    As pickle's docs say, in order to save and restore a class instance (actually a function, too), you must respect certain constraints: pickle can save and restore class instances transparently, …

  9. python - Pickle or json? - Stack Overflow

    138 I prefer JSON over pickle for my serialization. Unpickling can run arbitrary code, and using pickle to transfer data between programs or store data between sessions is a security hole. …

  10. Python: can't pickle module objects error - Stack Overflow

    Python's inability to pickle module objects is the real problem. Is there a good reason? I don't think so. Having module objects unpicklable contributes to the frailty of python as a parallel / …