|help| python 3.12

F

Filipe

I'm with a problem I'm doing a program in python, it sends the
following error message:

File "C:/Documents and Settings/Filipe Vinicius/Desktop/Filipe/Cefet/
LP/Python/trab.sistema.academico/sistemaacademico.2010.5.23.c.py",
line 40, in administrador
lp = pickle.load(f)
File "D:\Arquivos De Programa\Python31\lib\pickle.py", line 1365, in
load
encoding=encoding, errors=errors).load()
EOFError

What you need to do to repair this error? in my program at the part
where the error is find is that:

def administrador():
f = open('professores.dat', 'rb')
lp = pickle.load(f)
f.close()
...

Note: i had already imported the pikcle library
THX
 
G

Gary Herron

I'm with a problem I'm doing a program in python, it sends the
following error message:

File "C:/Documents and Settings/Filipe Vinicius/Desktop/Filipe/Cefet/
LP/Python/trab.sistema.academico/sistemaacademico.2010.5.23.c.py",
line 40, in administrador
lp = pickle.load(f)
File "D:\Arquivos De Programa\Python31\lib\pickle.py", line 1365, in
load
encoding=encoding, errors=errors).load()
EOFError

What you need to do to repair this error? in my program at the part
where the error is find is that:

def administrador():
f = open('professores.dat', 'rb')
lp = pickle.load(f)
f.close()
...

Note: i had already imported the pikcle library
THX


EOFError means "End Of File". The file you are reading in
'professores.dat' must not contain a valid pickle -- perhaps it is
empty, or created incorrectly. But that's where to look. Show us how
you created that file.

Gary Herron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top