Closed desireend closed 6 years ago
Nope. It still is giving issues.
If you're using Windows add gm to your PATH, follow the process given in the last closed issue
I am getting same error but i am on iphone 6 and mac
can anyone help
Anishs-MacBook-Pro:HQ-Trivia-Bot-master anish$ npm start
hqtriviabot@1.0.0 start /Users/anish/Downloads/HQ-Trivia-Bot-master node bot.js
Screenshot done
Error: Could not execute GraphicsMagick/ImageMagick: gm "convert" "screenshot.jpg" "-crop" "351x233+606+334" "answers.jpg" this most likely means the gm/convert binaries can't be found
at ChildProcess.
There needs to be better instructions / documentations. Tried reinstalling with npm install -g gm and still not working. No errors found in reinstallation.
I've added W:\HQ-Trivia-Bot-master\node_modules\gm to the environmental path already, still doesn't work.
I've gotten it to work. Download this: http://www.graphicsmagick.org/
It should be a .exe that you install for Windows. During the installation step, it'll ask you to add to environmental path.
Close your powershell / command prompt and relaunch it and run node bot.js. It should work now and generate a answers.jpg in the same folder. However, now I'm getting a "'tesseract' is not recognized as an internal or external command, operable program or batch file."
Update:
Looks like tesseract is the one that's used to do OCR on the image.
Update:
Got it to work fully.
Download this: https://github.com/tesseract-ocr/tesseract/wiki/4.0-with-LSTM#400-alpha-for-windows
Then add these 2 paths to the Path system environmental variable: C:\Program Files (x86)\Tesseract-OCR C:\Program Files (x86)\Tesseract-OCR\tessdata
Bloody hell, these should be instructions included in the original post.
Update:
OK, so looks like all this does is lookup answers on Wikipedia. Unlike other bots, it doesn't predict or tell you which answer is the correct one. It reads the question and does the scanning somewhat OK, there are a few characters that it misses during the OCA scan.
I'd just use other bots if I were you guys.
Hey, the bot research the question and look for number of occurrences for the answer, if it finds a Wikipedia website it search on the page for answers, I agree that the OCR is not really accurate but, did it for the fun 🙃
did everything @chaoscreater said to do and still get this error
Screenshot done Answers resized node-tesseract: Running 'tesseract answers.jpg C:\Users\Topher\AppData\Local\Tem p\tmp-1876L7qoo2V9IDKS' node-tesseract: Preprocessor cleanup { Error: Command failed: tesseract answers.jpg C:\Users\Topher\AppData\Local\Tem p\tmp-1876L7qoo2V9IDKS 'tesseract' is not recognized as an internal or external command, operable program or batch file.
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
killed: false, code: 1, signal: null, cmd: 'tesseract answers.jpg C:\Users\Topher\AppData\Local\Temp\tmp-1876L 7qoo2V9IDKS' }
If you look to your error it isn't the same, your error is because of tesseract, you must add tesseract to your environment variables, please take a look to the previous issues for further solutions
i did everything in the previous issues too
Can you copy/paste here your PATH ?
Try reinstalling it (
npm install -g gm
)