maxenxe / HQ-Trivia-Bot-NOT-MAINTAINED-

Small NodeJS bot for HQ Trivia
24 stars 13 forks source link

Error #5

Closed ghost closed 6 years ago

ghost commented 6 years ago

b878faf3b0773ca1769349b2047a9f2d I get this error when opening bot.js

maxenxe commented 6 years ago

To run a node js bot you must get in the script directory with a command prompt and type node bot.js

ghost commented 6 years ago

im getting this now

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. (C:\Users\Desktop\HQ-Trivia-Bot-master\node_modules\gm\lib\command.js:232:12) at emitOne (events.js:116:13) at ChildProcess.emit (events.js:211:7) at ChildProcess.cp.emit (C:\Users\Desktop\HQ-Trivia-Bot-master\node_modules\cross-spawn\lib\enoent.js:36:37) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

maxenxe commented 6 years ago

Please look at previous issues 😉

ghost commented 6 years ago

i did however the link you provided was for mac

maxenxe commented 6 years ago

What did you added to your PATH on windows ?

ghost commented 6 years ago

what do you mean by path? also im installing graphics magick to see if it works

maxenxe commented 6 years ago

There's a PATH field in you environment variables, the paths you put in are the paths your cmd will look to execute your commands

ghost commented 6 years ago

where would i find environment variables? also after installing magick i got this

Screenshot done Answers resized node-tesseract: Running 'tesseract answers.jpg C:\Users\AppData\Local\Temp\tmp-7696XTtI7VD7bu61' node-tesseract: Preprocessor cleanup { Error: Command failed: tesseract answers.jpg C:\Users\AppData\Local\Temp\tmp-7696XTtI7VD7bu61 '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\AppData\Local\Temp\tmp-7696XTtI7VD7bu61' }

maxenxe commented 6 years ago

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 ( Open Control Panel » System » Advanced » Environment Variables) C:\Program Files (x86)\Tesseract-OCR C:\Program Files (x86)\Tesseract-OCR\tessdata

ghost commented 6 years ago

it asks for a variable value, what should i put

maxenxe commented 6 years ago

Install the tesseract-ocr exe and add this to your PATH: ;C:\Program Files (x86)\Tesseract-OCR;C:\Program Files (x86)\Tesseract-OCR\tessdata

Don't forget the first semicolon

ghost commented 6 years ago

d06933f92c6a3943adefb833ef4fdb9b it wont let me click ok till i add a value

maxenxe commented 6 years ago

You shouldn't create a new variable but add it to the existing PATH variable

ghost commented 6 years ago

7f0d984d099f184d61b044a92ab5318b so it should like like this now

maxenxe commented 6 years ago

yes, sorry but you can remove the semicolon before the paths, I thought you where using Windows 7 but in Windows 10 you do not need the semicolon

ghost commented 6 years ago

thank it works!

maxenxe commented 6 years ago

you're welcome 🙂

ghost commented 6 years ago

question, what program did you use to find the cordinates

maxenxe commented 6 years ago

Didn't used it but http://www.adminsehow.com/wp-content/uploads/2012/03/MousePos.exe looks easy to use