r/stackoverflow • • Mar 24 '20

I'm having trouble unpickling booleans.

I'm making an RPG game, and I’m able to save and load the object for the player, and I’ve divided the game i to sections, and have booleans to determine where they’re at. When I try to load the boolean, I get and error. Here’s the code and the error:

reached_section1 = False with open(“demo_saves.dat”, “rb”) as f: reached_section1 = pickle.load(f)

OUTPUT: _pickle.UnpicklingError: invalid load key, ‘\xfe’

0 Upvotes

0 comments sorted by