dakaugu / hqtrivia Goto Github PK
View Code? Open in Web Editor NEWA Python script that answers HQ Trivia questions using an OCR and google search under 10 seconds (with reasonable internet speed)
License: Apache License 2.0
A Python script that answers HQ Trivia questions using an OCR and google search under 10 seconds (with reasonable internet speed)
License: Apache License 2.0
Traceback (most recent call last):
File "D:\Desktop\hqtrivia-master\play.py", line 112, in
feed(img)
File "D:\Desktop\hqtrivia-master\play.py", line 83, in feed
text = pytesseract.image_to_string(image)
File "C:\Users\Tom\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\Tom\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\Tom\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\Tom\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "C:\Users\Tom\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
installed terresact and added to path.
Traceback (most recent call last):
File "C:\Users\jaysun\Desktop\hqtrivia-master\play.py", line 116, in
feed(img)
File "C:\Users\jaysun\Desktop\hqtrivia-master\play.py", line 86, in feed
question, answers = text.split("?")
ValueError: not enough values to unpack (expected 2, got 1)
C:\Users\julia\Desktop\play>python play.py
QUESTION IS: ee HQ Which fashion magazine is also the French word for "she" or "her"
OPTIONS ARE:
[]
Analyzing...
Traceback (most recent call last):
File "play.py", line 112, in
feed(img)
File "play.py", line 90, in feed
calculate_answer(question, answers)
File "play.py", line 70, in calculate_answer
ans_occ = [x + y for x, y in zip(ans_occ, query_once(quest, ans))]
File "play.py", line 47, in query_once
content = get_response(query)
File "play.py", line 36, in get_response
response = urllib.request.urlopen(req).read()
File "C:\Python36-32\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "C:\Python36-32\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\Python36-32\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python36-32\lib\urllib\request.py", line 564, in error
result = self._call_chain(*args)
File "C:\Python36-32\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Python36-32\lib\urllib\request.py", line 756, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "C:\Python36-32\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\Python36-32\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python36-32\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "C:\Python36-32\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Python36-32\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable
can you help me with this error?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.