Giter VIP home page Giter VIP logo

hq_bot's Introduction

HQ_Bot 🤖

License: MIT

A bot to help answer questions on trivia apps like HQ and CashShow. This bot takes screenshot of the game on the phone and uses googles tesseract OCR to read the questions and options. It automates the process of googling of the answers and gives the most likely answer! It is 70%+ accurate!

Since it is against the policy of HQ-trivia i do not encourage anyone to use this during a live game and this is purely for educational purposes.

Packages Used

Use python 3.6. In particular the packages/libraries used are...

  • JSON - Data Storage
  • Pillow - Image manipulation
  • Google-Search-API - Google searching
  • wikipediaapi - Wikipedia searches
  • pytesseract - Google's free/open source OCR (requires seperate installtion)
  • beautifulsoup4 - Parse google searches/html
  • lxml - Beautifulsoup parser
  • opencv2 - Image maniplulation
  • pyscreenshot - Take screenshot of the game
  • wxPython - GUI interface

To easily install these

  1. Install python 3.6
  2. Install above packages
    • $ pip3 install -r requirements.txt
  3. For tesseract
    • $ brew install tesseract
  4. For opencv
    • $ brew install opencv

Usage

Make sure all packages above are installed. For android phones use Vysor and for iOS use quicktime player. The code expects the phone to be on the left side of the screen. If you want to change the screenshot co-ordinates change the values inside the ImageGrab in the screen_grab() function. To use the script :

$ git clone https://github.com/sushant10/HQ_Bot
$ cd HQ_Bot
$ pip3 install -r requirements.txt
$ python3 answer_bot.py
Press s to screenshot live game, sampq to run against sample questions or q to quit:
s
...Question...

Screenshots

Contributing

All contributions welcome.

Credits

Special shout out

Jake Mor was the person behind HQuack, the most viral popular bot to help solve HQ questions. His implementation inspired me to try my own. I recommend reading this article to learn more about the whole story.

Useful links

License

The MIT License (MIT)

hq_bot's People

Contributors

arudiuk avatar sushant10 avatar tbhaxor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hq_bot's Issues

bot taking too long to give answer

============= RESTART: C:\Python36\Scripts\HQ_Bot\answer_bot.py =============
�[93m
Press s to screenshot live game, sampq to run against sample questions or q to quit:
�[0msampq

  1. �[4mWhich baseball player is NOT mentioned in Billy Joel〙s 〜We Didn〙t Start the Fire〞?�[0m

�[92mMinky Mantel�[0m { points: �[1m-3�[0m }

Jackie Robinson { points: �[1m-1303�[0m }

Roy Campanella { points: �[1m-1111�[0m }

issues:

  1. � these are <--(arrow) in cmd
    2)Im getting 0m and 93m at start and in the bracket of points(next to options)
    3)Total run time for running sample is 18 minutes. its taking more than 2 minutes for 1st question. In between it takes more time for some questions.

please give slution as soon as possible bro

google.search('query',num) returns empty set

Please help.

Traceback (most recent call last):
File "answer_bot.py", line 277, in
get_points_live()
File "answer_bot.py", line 263, in get_points_live
points,maxo = google_wiki(simq, options, neg)
File "answer_bot.py", line 211, in google_wiki
link = search_wiki[0].link
IndexError: list index out of range

Error when running "no module named google"

anyone know how to fix this error when i try to run the program ?
had the same problem with bs4 but fixed that one

MacBook-Pro:HQ_Bot user$ python3 answer_bot.py
Traceback (most recent call last):
File "answer_bot.py", line 19, in
from google import google
ModuleNotFoundError: No module named 'google'
MacBook-Pro:HQ_Bot user$

IDEA - Google vision api

hey sushant10,

i was working on my own "bot" as well for hq-trivia. I did not figure out how use the tesseract ocr, and ended up using goolge vision. i would like to test this out and maybe implement it on your version, since it is well developed. I will let you know of the results.

No such file or directory: 'Data/settings.json'

Whenever I run the code, I get this error:

C:\PythonPrograms>python answer_bot.py
Traceback (most recent call last):
File "answer_bot.py", line 264, in
load_json()
File "answer_bot.py", line 49, in load_json
remove_words = json.loads(open("Data/settings.json").read())["remove_words"]
FileNotFoundError: [Errno 2] No such file or directory: 'Data/settings.json'

OpenCV runtime error

Keep getting this error, everything is up-to-date.

raceback (most recent call last):
File "answer_bot.py", line 23, in
import cv2
File "/usr/local/lib/python3.6/site-packages/cv2/init.py", line 4, in
from .cv2 import *
ImportError: dlopen(/usr/local/lib/python3.6/site-packages/cv2/cv2.cpython-36m-darwin.so, 2): Symbol not found: _clock_gettime
Referenced from: /usr/local/lib/python3.6/site-packages/cv2/.dylibs/libavutil.55.78.100.dylib (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
in /usr/local/lib/python3.6/site-packages/cv2/.dylibs/libavutil.55.78.100.dylib

WinError 2 error

Program can't read the text unfortunately. I get a [WinError 2] error. Anyone know what to do??

PermissionError.

File "answer_bot.py", line 267, in
get_points_live()
File "answer_bot.py", line 245, in get_points_live
question,options=parse_question()
File "answer_bot.py", line 102, in parse_question
text = read_screen()
File "answer_bot.py", line 84, in read_screen
text = pytesseract.image_to_string(Image.open(filename))
File "C:\Python36\lib\site-packages\pytesseract\pytesseract.py", line 193, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "C:\Python36\lib\site-packages\pytesseract\pytesseract.py", line 140, in run_and_get_output
run_tesseract(**kwargs)
File "C:\Python36\lib\site-packages\pytesseract\pytesseract.py", line 111, in run_tesseract
proc = subprocess.Popen(command, stderr=subprocess.PIPE, shell=True)
File "C:\Python36\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "C:\Python36\lib\subprocess.py", line 998, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied

I've tried running cmd as an admin and still no luck

FilenotFound error

Traceback (most recent call last):
File "answer_bot.py", line 286, in
/ Reading screenget_points_live()
File "answer_bot.py", line 264, in get_points_live
question,options=parse_question()
File "answer_bot.py", line 118, in parse_question
text = read_screen()
File "answer_bot.py", line 100, in read_screen
text = pytesseract.image_to_string(Image.open(filename))
File "C:\Users\vikash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytesseract\pytesseract.py", line 193, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "C:\Users\vikash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytesseract\pytesseract.py", line 140, in run_and_get_output
run_tesseract(**kwargs)
File "C:\Users\vikash\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytesseract\pytesseract.py", line 111, in run_tesseract
proc = subprocess.Popen(command, stderr=subprocess.PIPE)
File "C:\Users\vikash\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "C:\Users\vikash\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

plzzz help

Tesseract error

I don't understand this error.
sherlock@sherlock ~/Documents/HQ_Bot-master $ python3 answer_bot.py

Press s to screenshot live game, sampq to run against sample questions or q to quit:
s
Traceback (most recent call last):
File "answer_bot.py", line 271, in
get_points_live()
File "answer_bot.py", line 249, in get_points_live
question,options=parse_question()
File "answer_bot.py", line 106, in parse_question
text = read_screen()
File "answer_bot.py", line 88, in read_screen
text = pytesseract.image_to_string(Image.open(filename))
File "/usr/local/lib/python3.5/dist-packages/pytesseract/pytesseract.py", line 193, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "/usr/local/lib/python3.5/dist-packages/pytesseract/pytesseract.py", line 140, in run_and_get_output
run_tesseract(**kwargs)
File "/usr/local/lib/python3.5/dist-packages/pytesseract/pytesseract.py", line 116, in run_tesseract
raise TesseractError(status_code, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (1, 'Error opening data file /usr/local/share/tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages! Could not initialize tesseract.'`

Mac OS error when typing "s" for the second time.

After the first screenshot, everything is fine, but after typing "s" for the second time (new screenshot) the app errors and quits. I have to Ctrl-C to exit and rerun the app again.

If useful, here's the code produced after python errors out:

Press s to screenshot live game, sampq to run against sample questions or q to quit:
s
^CTraceback (most recent call last):
  File "answer_bot.py", line 271, in <module>
    get_points_live()
  File "answer_bot.py", line 249, in get_points_live
    question,options=parse_question()
  File "answer_bot.py", line 106, in parse_question
    text = read_screen()
  File "answer_bot.py", line 65, in read_screen
    screen_grab(screenshot_file)
  File "answer_bot.py", line 59, in screen_grab
    im = Imagegrab.grab(bbox=(31,228,485,590))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyscreenshot/__init__.py", line 46, in grab
    return _grab(to_file=False, childprocess=childprocess, backend=backend, bbox=bbox)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyscreenshot/__init__.py", line 29, in _grab
    return run_in_childprocess(_grab_simple, imcodec.codec, to_file, backend, bbox, filename)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyscreenshot/procutil.py", line 29, in run_in_childprocess
    e, r = queue.get()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/queues.py", line 94, in get
    res = self._recv_bytes()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/connection.py", line 379, in _recv
    chunk = read(handle, remaining)
KeyboardInterrupt

Video tutorial

Can someone please make a video tutorial to run this on a windows pc? It would be MUCH apprciated

Google-Search-API issue

Receiving Error:
Traceback (most recent call last):
File "answer_bot.py", line 17, in
from bs4 import BeautifulSoup
ModuleNotFoundError: No module named 'bs4'

Went through installation, and receiving this.

no module named 'modules'

This is the error I get...
image

This is the file that's producing the error...
image

But I don't know why. the folder that contains the modules are in the module folder. Any help appreciated.

WinError 2

Everything was alright, it worked well on sample questions but when I type s to take screenshot
At last it says the system cannot find the specified file
38089724-0ba16ef8-337e-11e8-9d60-504af1dd8421

Windows // google search api

HI i am using Windows and php and getting this error
C:\Users\wader\HQ_Bot>pip3 install -r requirements.txt
Requirement already satisfied: simplejson in c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 1))
Collecting Google-Search-API (from -r requirements.txt (line 2))
Using cached Google-Search-API-1.1.13.tar.gz
Complete output from command python setup.py egg_info:
c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\extern_init_.py:1: UserWarning: Module google was already imported from None, but c:\users\wader\appdata\local\temp\pip-build-3dx_4ub1\google-search-api is being added to sys.path
from pkg_resources.extern import VendorImporter
Traceback (most recent call last):
File "", line 1, in
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\setuptools_init_.py", line 10, in
from setuptools.extern.six.moves import filter, map
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\extern_init_.py", line 1, in
from pkg_resources.extern import VendorImporter
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init_.py", line 3147, in
@call_aside
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init
.py", line 3131, in call_aside
f(*args, **kwargs)
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init
.py", line 3175, in initialize_master_working_set
for dist in working_set
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init
.py", line 3175, in
for dist in working_set
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init_.py", line 2701, in activate
declare_namespace(pkg)
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init_.py", line 2260, in declare_namespace
handle_ns(packageName, path_item)
File "c:\users\wader\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_init
.py", line 2195, in handle_ns
loader.load_module(packageName)
File ".\google_init
.py", line 1, in
from modules import calculator, currency, images, utils
ModuleNotFoundError: No module named 'modules'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\wader\AppData\Local\Temp\pip-build-3dx_4ub1\Google-Search-API\

No Results

It's showing 0 percentage for all three results plz help

FileNotFoundError: [WinError 2] The system cannot find the file specified

screenshot 27

D:\WorkStation\Test Zone\HQ_Bot-master>python answer_bot.py
�[93m
Press s to screenshot live game, sampq to run against sample questions or q to quit:
�[0ms
Traceback (most recent call last):
File "answer_bot.py", line 281, in
get_points_live()
File "answer_bot.py", line 259, in get_points_live
question,options=parse_question()
File "answer_bot.py", line 116, in parse_question
text = read_screen()
File "answer_bot.py", line 98, in read_screen
text = pytesseract.image_to_string(Image.open(filename))
File "C:\Users\ZeroByteDNA\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytesseract\pytesseract.py", line 193, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "C:\Users\ZeroByteDNA\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytesseract\pytesseract.py", line 140, in run_and_get_output
run_tesseract(**kwargs)
File "C:\Users\ZeroByteDNA\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytesseract\pytesseract.py", line 111, in run_tesseract
proc = subprocess.Popen(command, stderr=subprocess.PIPE)
File "C:\Users\ZeroByteDNA\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "C:\Users\ZeroByteDNA\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

cannot import name 'google'

D:\HQ_Bot-master>py answer_bot.py
Traceback (most recent call last):
File "answer_bot.py", line 19, in
from google import google
ImportError: cannot import name 'google'

Video

Im new to this, is there anyway someone could make a video?

Issue with OCR

Hi, I've installed all the required packages with pip3, I don't have any error message, but the answers proposed by CashShow are not "read" by the OCR. I precise that Vysor windows is at the left of the screen.

sans titre

pls helpe with unicode error

C:\Users\julia\Desktop\hqbot>python answer_bot.py
Traceback (most recent call last):
File "answer_bot.py", line 282, in
load_json()
File "answer_bot.py", line 64, in load_json
sample_questions = json.loads(open("Data/questions.json").read())
File "C:\Python36-32\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 93: character maps to

Screenshot isn't reading text properly

Guys, I set this all up and idk what step I'm doing wrong but the screenshot isn't reading the text properly. On some screenshots it picks up half the text and like choice A, on some it picks up nothing, and therefore it isn't really giving me proper answers either. Anyone have any suggestions on what I'm doing wrong?
capture

Bot runs, but cant take screenshot?

So I can open the script and it runs, but when I press S and then Enter, it pops up with this

Traceback (most recent call last):
File "answer_bot.py", line 342, in
keypressed = input(bcolors.WARNING +'\nPress s to screenshot live game, sampq to run against sample questions or q to quit:\n' + bcolors.ENDC)
File "", line 1, in
NameError: name 's' is not defined

I am not sure, but I think it's saying that S is not bound to a line of code?
Someone please help

google-search-api installation error

Collecting google-search-api
Using cached Google-Search-API-1.1.13.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-5njep_if/google-search-api/setup.py", line 15, in
with open("test_requirements.txt") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'test_requirements.txt'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5njep_if/google-search-api/

No such file or directory

Hello,

I keep getting an error when running python3 answer_bot.py
I am positive I did everything correct and that it is cd'ed

Screenshot:
screen shot 2018-02-21 at 5 00 38 pm

python3 windows issue

$ pip3 install -r requirements.txt
Requirement already satisfied: simplejson in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: Google-Search-API in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 2))
Requirement already satisfied: Pillow in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 3))
Requirement already satisfied: opencv-contrib-python in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 4))
Requirement already satisfied: pytesseract in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 5))
Requirement already satisfied: beautifulsoup4 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 6))
Requirement already satisfied: pyscreenshot in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 7))
Requirement already satisfied: lxml in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 8))
Requirement already satisfied: wikipedia in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from -r requirements.txt (line 9))
Requirement already satisfied: selenium<3.0.0,>=2.44.0 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: requests in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: unidecode in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: vcrpy in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: future in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: numpy>=1.11.3 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from opencv-contrib-python->-r requirements.txt (line 4))
Requirement already satisfied: EasyProcess in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from pyscreenshot->-r requirements.txt (line 7))
Requirement already satisfied: idna<2.7,>=2.5 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from requests->Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: certifi>=2017.4.17 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from requests->Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from requests->Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from requests->Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: wrapt in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from vcrpy->Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: yarl; python_version in "3.4, 3.5, 3.6" in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from vcrpy->Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: PyYAML in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from vcrpy->Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: six>=1.5 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from vcrpy->Google-Search-API->-r requirements.txt (line 2))
Requirement already satisfied: multidict>=4.0 in c:\users\gandalf\appdata\local\programs\python\python36-32\lib\site-packages (from yarl; python_version in "3.4, 3.5, 3.6"->vcrpy->Google-Search-API->-r requirements.txt (line 2))

Gandalf@DESKTOP-VB16S55 MINGW64 ~/Desktop/HQ_Bot (master)
$ python3 answer_bot.py
bash: python3: command not found

How do i remove words?

i can't seem to find the way to use the remove words function of your program.
can you help me?
how do i exclude words out of the question
schermafbeelding 2018-03-28 om 13 43 41

brew install tesseract ??

brew install tesseract command error
'brew' is not recognized as an internal or external command,
operable program or batch file.

hq bot not reading questions properly

screen shot 2018-03-24 at 11 32 07 am

Whenever I run the answer bot it can never read the beginning of the question right but it has no issue reading the answers. I tried doing what it said in the charmap error thread but i couldn't seem to figure out how to edit pytesseract.py. can anyone help?

No answer

my bot used to do the problem in #15 but now show nothing after the question.
screen shot 2018-03-23 at 4 36 20 pm

please help I need this for Sunday $60k

Error installing the Packages

I was having issues with the Google package but after installing it individually I thought I got around it then I got this error message

capture

Is anyone else getting is error?

Unknown error when running

Traceback (most recent call last):�[0m�[0m�[0m
�[0m�[0m�[0m  File "D:\Desktop\HQ_Bot-master\answer_bot.py", line 282, in <module>
    load_json()
�[0m�[0m�[0m�[0m�[0m�[0m  File "D:\Desktop\HQ_Bot-master\answer_bot.py", line 64, in load_json
    sample_questions = json.loads(open("Data/questions.json").read())
�[0m�[0m�[0m�[0m�[0m�[0m  File "C:\Users\-\AppData\Local\Programs\Python\Python36\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
�[0m�[0m�[0m�[0m�[0m�[0mUnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 93: character maps to <undefined>
�[0m�[0m�[0m�[0m�[0m�[0m

Errors in loading JSON files but dont want to tamper with what you've made

Getting error no module named "bs4"

I'm getting an error for bs4. I've tried testing on the rest of the stuff, but it doesn't work for google or PIL. Here's the exact error message:
Traceback (most recent call last):
File "answer_bot.py", line 18, in
from bs4 import BeautifulSoup
ModuleNotFoundError: No module named 'bs4'

It would be great if you could help me with this issue, feel free to ask me for any more information you might need. The file is currently on my desktop, which is probably the reason that it can't find the modules. I'm on a macbook air. Thank you!

charmap error!

any help resolving this appreciated...

python answer_bot.py
Traceback (most recent call last):
File "answer_bot.py", line 276, in
load_json()
File "answer_bot.py", line 63, in load_json
sample_questions = json.loads(open("Data/questions.json").read())
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 94: character maps to

Charmap issues now

Traceback (most recent call last):
File "reader.py", line 262, in
load_json()
File "reader.py", line 49, in load_json
sample_questions = json.loads(open("Data/questions.json").read())
File "C:\Python36\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 94: character maps to

UnicodeError // JSON

C:\Users\Hari\HQ_Bot>python answer_bot.py
Traceback (most recent call last):
File "answer_bot.py", line 263, in
load_json()
File "answer_bot.py", line 53, in load_json
sample_questions = json.loads(open("Data/questions.json").read())
File "C:\Users\Hari\AppData\Local\Programs\Python\Python36-32\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 94: character maps to undefined

What's after step 2

I finished step 2. And now I'm stuck. Could any one explain what to do after that step. I'm on a pc btw. Id like to see a tutorial or more detailed instructions. I don't even know how to run it, all I can do is test it and i get the error for bs4 that someone else had. So if someone could give links and some help that be great! I'd paypal some money if someone gets it working for me!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.