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

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

The question is "♀" and Cannot read property 'links' of null #27

Open U-r-Unknown opened 6 years ago

U-r-Unknown commented 6 years ago

screenshot and error message:

C:\Python36\Scripts\HQ-Trivia-Bot>node bot.js Screenshot done Answers resized node-tesseract: Running 'tesseract answers.jpg C:\Users\ADARSH\AppData\Local\Tem p\tmp-2916ZISEZN7yzZyS' node-tesseract: Deleting 'C:\Users\ADARSH\AppData\Local\Temp\tmp-2916ZISEZN7yzZy S.txt' node-tesseract: Preprocessor cleanup ♀ Question resized node-tesseract: Running 'tesseract question.jpg C:\Users\ADARSH\AppData\Local\Te mp\tmp-2916iyPBr5jelIh1' node-tesseract: Deleting 'C:\Users\ADARSH\AppData\Local\Temp\tmp-2916iyPBr5jelIh 1.txt' node-tesseract: Preprocessor cleanup The question is "d ♀" Error: Error on response:Error: getaddrinfo ENOTFOUND www.google.com www.google. com:443 : undefined at Request._callback (C:\Python36\Scripts\HQ-Trivia-Bot\node_modules\google\ lib\google.js:98:16) at self.callback (C:\Python36\Scripts\HQ-Trivia-Bot\node_modules\request\req uest.js:186:22) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Request.onRequestError (C:\Python36\Scripts\HQ-Trivia-Bot\node_modules\re quest\request.js:878:8) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at TLSSocket.socketErrorListener (_http_client.js:387:9) at emitOne (events.js:116:13) at TLSSocket.emit (events.js:211:7) C:\Python36\Scripts\HQ-Trivia-Bot\bot.js:50 for (var i = 0; i < res.links.length; ++i) { ^

TypeError: Cannot read property 'links' of null at C:\Python36\Scripts\HQ-Trivia-Bot\bot.js:50:55 at Request._callback (C:\Python36\Scripts\HQ-Trivia-Bot\node_modules\google\ lib\google.js:98:7) at self.callback (C:\Python36\Scripts\HQ-Trivia-Bot\node_modules\request\req uest.js:186:22) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Request.onRequestError (C:\Python36\Scripts\HQ-Trivia-Bot\node_modules\re quest\request.js:878:8) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at TLSSocket.socketErrorListener (_http_client.js:387:9) at emitOne (events.js:116:13)

C:\Python36\Scripts\HQ-Trivia-Bot>

U-r-Unknown commented 6 years ago

untitled

maxenxe commented 6 years ago

Look like the coordinate aren't correctly set, try playing around with the numbers