-
Notifications
You must be signed in to change notification settings - Fork 596
Open
Description
I am trying to run the very basic example found in the README file.
I reached the following line:
./ocropus-rpred -Q 4 -m models/fraktur.pyrnn.gz 'book/0001/010001.bin.png'
But it gives me the following error:
INFO:
INFO: ########## ./ocropus-rpred -Q 4 -m models/fraktur.pyrnn.gz book/0001/01
INFO:
INFO: #inputs: 1
# loading object .\.\models/fraktur.pyrnn.gz
Traceback (most recent call last):
File "./ocropus-rpred", line 120, in <module>
network = ocrolib.load_object(args.model,verbose=1)
File "C:\Users\96171\Desktop\ocropy\ocrolib\common.py", line 445, in load_object
return unpickler.load()
EOFError
The error is appearing in the following function from common.py:
def load_object(fname,zip=0,nofind=0,verbose=0):
"""Loads an object from disk. By default, this handles zipped files
and searches in the usual places for OCRopus. It also handles some
class names that have changed."""
if not nofind:
fname = ocropus_find_file(fname)
if verbose:
print("# loading object", fname)
if zip==0 and fname.endswith(".gz"):
zip = 1
if zip>0:
# with gzip.GzipFile(fname,"rb") as stream:
with os.popen("gunzip < '%s'"%fname,"rb") as stream:
unpickler = cPickle.Unpickler(stream)
unpickler.find_global = unpickle_find_global
return unpickler.load()
else:
with open(fname,"rb") as stream:
unpickler = cPickle.Unpickler(stream)
unpickler.find_global = unpickle_find_global
return unpickler.load()
Metadata
Metadata
Assignees
Labels
No labels