Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M1 instructions don't work as intended #60

Open
adamjcampbell opened this issue Nov 25, 2024 · 2 comments
Open

M1 instructions don't work as intended #60

adamjcampbell opened this issue Nov 25, 2024 · 2 comments

Comments

@adamjcampbell
Copy link

Following the steps here:
https://game2text.com/resources/macos/m1-game2text/

There are perhaps a couple changes, python 3.8 is deprecated so I had to use 3.9

I am able to run the app but the main issue I run into is with tesseract:

Traceback (most recent call last):
  File "/Users/adam/Downloads/Game2Text-main/venv/lib/python3.9/site-packages/eel/__init__.py", line 537, in _process_message
    return_val = _exposed_functions[message['name']](*message['args'])
  File "/Users/adam/Downloads/Game2Text-main/game2text.py", line 34, in recognize_image
    return detect_and_log(engine, image, orientation, session_start_time, get_time_string())
  File "/Users/adam/Downloads/Game2Text-main/ocr.py", line 16, in detect_and_log
    result = image_to_text(engine, cropped_image, text_orientation)
  File "/Users/adam/Downloads/Game2Text-main/ocr.py", line 33, in image_to_text
    return tesseract_ocr(image, text_orientation)
  File "/Users/adam/Downloads/Game2Text-main/ocr.py", line 47, in tesseract_ocr
    result = pytesseract.image_to_string(image, config=custom_config, lang=language)
  File "/Users/adam/Downloads/Game2Text-main/venv/lib/python3.9/site-packages/pytesseract/pytesseract.py", line 486, in image_to_string
    return {
  File "/Users/adam/Downloads/Game2Text-main/venv/lib/python3.9/site-packages/pytesseract/pytesseract.py", line 489, in <lambda>
    Output.STRING: lambda: run_and_get_output(*args),
  File "/Users/adam/Downloads/Game2Text-main/venv/lib/python3.9/site-packages/pytesseract/pytesseract.py", line 352, in run_and_get_output
    run_tesseract(**kwargs)
  File "/Users/adam/Downloads/Game2Text-main/venv/lib/python3.9/site-packages/pytesseract/pytesseract.py", line 284, in run_tesseract
    raise TesseractError(proc.returncode, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (-6, "dyld[31966]: Library not loaded: ../../../leptonica/1.80.0/lib/liblept.5.dylib   Referenced from: <13EB3CE1-0793-372C-928A-174D40B8F059> /Users/adam/Downloads/Game2Text-main/resources/bin/mac/tesseract/4.1.1/bin/tesseract   Reason: tried: '../../../leptonica/1.80.0/lib/liblept.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS../../../leptonica/1.80.0/lib/liblept.5.dylib' (no such file), '../../../leptonica/1.80.0/lib/liblept.5.dylib' (no such file), '/usr/local/lib/liblept.5.dylib' (no such file), '/usr/lib/liblept.5.dylib' (no such file, not in dyld cache)")

Even though I get the error everything seems to be there:

leptonica/1.80.0/lib via 🐍 3.9.6 via Game2Text-main
➜ ls -lart
total 14840
drwxrwxr-x@ 3 adam  staff       96 19 Sep  2023 pkgconfig
-rw-rw-r--@ 1 adam  staff  2169872 19 Sep  2023 liblept.dylib
-rw-rw-r--@ 1 adam  staff  3254128 19 Sep  2023 liblept.a
-rw-rw-r--@ 1 adam  staff  2169872 19 Sep  2023 liblept.5.dylib
drwxrwxr-x@ 4 adam  staff      128 19 Sep  2023 cmake
drwxrwxr-x@ 9 adam  staff      288 19 Sep  2023 ..
drwxrwxr-x@ 7 adam  staff      224 19 Sep  2023 .
@adamjcampbell
Copy link
Author

Oh wait, I got it all working.. I'll fix instructions when I have a chance

@adamjcampbell
Copy link
Author

For some reason the OCR reading is extremely slow 😖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant