hrishikeshrt / google_drive_ocr

Perform OCR using Google's Drive API v3
Other
37 stars 10 forks source link

google-drive-ocr runtime error ...Installed successfully Android #1

Closed defencedog closed 2 years ago

defencedog commented 2 years ago

Description

Runtime error

What I Did

Install via

pkg install popper
pip install google_drive_ocr
cd <libDir>
ln -s liblcms2.so liblcms2.so.2

google-ocr --config /storage/28E1-1BF4/GoogleOCR/gdo.cfg --pdf /storage/emulated/0/Download/In.pdf --pages 1-3 --verbose

Storing credentials to /data/data/com.termux/files/home/.credentials/token.json file_cache is only supported with oauth2client<4.0.0 Extracting 3 pages from '/storage/emulated/0/Download/In.pdf' .. Extracted 3 pages: 1 to 3. Traceback (most recent call last): File "/data/data/com.termux/files/usr/bin/google-ocr", line 8, in sys.exit(main()) File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/google_drive_ocr/cli.py", line 153, in main app.perform_ocr_batch( File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/google_drive_ocr/application.py", line 266, in perform_ocr_batch _workload = workload + (idx < extra) UnboundLocalError: local variable 'extra' referenced before assignment

hrishikeshrt commented 2 years ago

Pushed a patch to fix this.