7
¿Por qué obtengo “Pickle - EOFError: Se agotó la entrada” al leer un archivo vacío?
Recibo un error interesante al intentar usar Unpickler.load(), aquí está el código fuente: open(target, 'a').close() scores = {}; with open(target, "rb") as file: unpickler = pickle.Unpickler(file); scores = unpickler.load(); if not isinstance(scores, dict): scores = {}; Aquí está el rastreo: Traceback (most recent call last): File "G:\python\pendu\user_test.py", line 3, in …