i tried to do unpickling using w+b mode. i got the exception EOFError: ran out of input. why is unpickling not possible in w+b mode? w+b mode also offers reading a binary file right then why am i getting this exception and what does ran out of input means in here
Add a comment |
1 Answer 1
Opening a file in w+b will truncate the file. If you want to open a file for reading and writing without truncation, you should use r+b.
Sign up to request clarification or add additional context in comments.
Comments
- The Overflow Blog
-
-
- Featured on Meta
-
-
-
Related
Hot Network Questions
- Analog story - Human music contains coded alien message
- How does one derive involutivity of complement from the axioms of a Boolean algebra?
- Why doesn't an aircraft turn when rolling on a point?
- Were Biblical “Servants” Essentially Slaves?
- Can a Gazer using Telekinetic Ray throw a creature 30 feet up in the air?
- Mirror in both directions in Inkscape
- What actually creates impedance, or what increases the impedance of a system?
- How to test i.i.d. assumption?
- How much storage space do I really have?
- Cutting a Möbius strip in thirds. Why are the resulting strips interlinked?
- What exactly is different about the slice of space and lightcone concept in special relativity?
- Replacing Exterior Outlet/Receptacle Covers
- What is the convention for slurs and word extensions when chorus is singing on sustained vowel or consonant sound?
- In Hinduism, are crows associated with any other Hindu deities aside from Maa Dhumavati & Shani Dev?
- Dactylic hexameter composition feedback
- A Sequence of Words
- How to automatically refresh or reload Import CSV node data?
- A "crappy" pentagon puzzle
- Does the passport one use to enter and leave a country sometimes determine which passport one must use when entering the next country?
- Shimano xtr wh-m959 wheel
- How do you time a Perfect Guard against a Guardian?
- Why does Lu Xun's 《祝福》use 莱 instead of 菜?
- resume enumerate from previous environment
- Why does D.J. translate "liberate me" as "save me"?
lang-py