Closed defencedog closed 2 years ago
This is the same error as mentioned in #1
Please make sure you have installed the latest version.
You may have to run pip install --upgrade google-drive-ocr
to get the latest version (0.2.5+)
I have built via git clone... See the version is written above in the Runtime error
Ah, my bad. I see that you have 0.2.5.
Although, in that case, I am unable to understand or reproduce the issue.
The variable extra
does get set before it's accessed.
Could you paste the output of following,
grep extra data/data/com.termux/files/usr/lib/python3.10/site-packages/google_drive_ocr/application.py -C 5
Here
.../site-packages/google_drive_ocr $ grep extra application.py -C 5 workload = file_count // workers
if workers > 1:
print(f"Total {file_count} files "
f"distributed among {workers} workers.")
print(f"Workload: {workload}-{workload + 1} per worker")
extra = file_count % workers
worker_arguments = []
_start = 0
for idx in range(workers):
_workload = workload + (idx < extra)
worker_arguments.append({
'worker_id': idx,
'image_files': image_files[_start:_start+_workload],
'disable_tqdm': disable_tqdm
})
This seems to be the older version of file still. Check out the current version of the file in the repository.
Perhaps an uninstall and re-install of the package would fix it.
Dear author I am literally sorry ...It's weird that today I upgraded pip & problem solved
google-ocr --config /storage/28E1-1BF4/GoogleOCR/gdo.cfg --pdf in.pdf
(PID:26799): 100%|███████████████████████████████████████████████████| 3/3 [00:20<00:00, 6.91s/it]
Total Time Taken: 20.81 seconds
No need to be sorry :-) I am glad the issue is resolved.
Description
Installed via Source Runtime error... Got x3 separate pages in my dir though ...
What I Did