Comments (69)
So I got it working!
Get a fresh copy of the repository and do as luisfelipedejesusm had mentioned and add import ssl at the top and the other edits. If you get an indentation error open answer_bot.py in textedit on mac or notepad on windows and find the line that you added and the line under it you modified. Remove all of the spaces before these two lines and replace them with two tabs. After that run the script and type sampq to run the sample questions, all should be good. If you can't get it to work when trying to screenshot make sure you set your screen coordinates correctly in the screen_grab method. Good luck.
from hq_bot.
I'm going to need more info, im not a wizard who can figure out why it doesnt work for you
from hq_bot.
when i runthe sampq command it's showing questions and 3 answers but each answers is showing 0 percantage
from hq_bot.
i'm going to need more than that. Did you change any code?
from hq_bot.
no
from hq_bot.
How long is each answer taking?
from hq_bot.
from hq_bot.
What is the output for second question?
from hq_bot.
from hq_bot.
It is not getting any results from the web, which is weird. Make sure Google-search-API is working.
from hq_bot.
how to know if Google-search-API is working
from hq_bot.
i dont know why it isnt working, my only assumption is probably that one or more of the modules are not properly installed
from hq_bot.
does this work on windows??
from hq_bot.
i have never tried it
from hq_bot.
I'm also having this issue. I have confirmed that all modules are installed and working. I have only changed the capture coordinates and this happens in sample and live.
from hq_bot.
Although during the sample questions I get a hit of 305 on Chubai (Question 18) and a hit of 27 on Waldo (Question 7) but that is it.
from hq_bot.
Same here too. 0% for every question. I'm running Windows 7
from hq_bot.
This is the same thing that everyone else keeps getting, but would just like to focus on it more.
from hq_bot.
Sounds like some of you may not have the Google Search API package correctly installed. I'm on windows 10 and this works for me. Try issuing this command instead.
pip3 install git+https://github.com/abenassi/Google-Search-API/
That should work fine as long as you have pip3 in your environmental variables. After that, redo the package requirements:
pip3 install -r requirements.txt
Hopefully everything is working after that. Good luck.
from hq_bot.
Unfortunately trying a reinstall of the google search api did not solve my issue.
You can see here that I already have the API Installed.
And here I try to perform an upgrade. Although, you can see that I am already up to date.
Here I run a simple querry and do return results which leads me to believe the API is functional.
from hq_bot.
Yep I keep getting the same exact output as you even after trying to reinstall the google api
from hq_bot.
I am also getting the same result. If any of you guys has solved it then please write the solution. Hope the owner does look into it and help us.
from hq_bot.
I am on mac and have the same problem
from hq_bot.
Guysssss we have to fix this for Sunday!!!!!! Let’s gooooo we got this I believe!!
from hq_bot.
If you havent solved it, the problem is in get_page()
method
you just need to add
gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
before
html = urllib2.urlopen(req).read()
and modify
html = urllib2.urlopen(req).read()
into
html = urllib2.urlopen(req, context=gcontext).read()
from hq_bot.
that didnt work for me
from hq_bot.
Your the man, man. Damn those ssl certificates.
I'm no python wizard and I'm getting an error do you happen to know exactly what I F*d up here?
from hq_bot.
I get the inconsistent use of tabs message too
from hq_bot.
Edit --> Select All
Format --> Untabify Region
Assuming your editor has replaced 8 spaces with a tab, enter 8 into the input box.
Hit select, and it fixes the entire document.
Also if you go to save it make sure it says UTF-8 im pretty sure
from hq_bot.
What editor are you using?
from hq_bot.
Im using IDLE
from hq_bot.
Thanks! I'm getting boned with some syntax error now i'll have to take a look tomorrow and see what I can find
from hq_bot.
yea im getting the syntax error also, if you can fidn anything wrong that would be awesome to hear back from you!!
from hq_bot.
and if everyone is using this tonight to win anyway nobody is going to win
from hq_bot.
Exactly 1 vs 1.5+ million. I'd have a better chance getting inside the queen of england
from hq_bot.
hahahhaha well hopefully we can figure this out to win some money each day
from hq_bot.
Too bad the person who actually made the script isnt helping us but whatever
from hq_bot.
from hq_bot.
I have not received that. What editor did you use?
from hq_bot.
idle
from hq_bot.
3.4.6
from hq_bot.
hmmmm did it work before you edited it?
from hq_bot.
yes but result was almost always 0
from hq_bot.
is this what
it should look like?
from hq_bot.
yes but you need to go to
Edit --> Select All
Format --> Untabify Region
Assuming your editor has replaced 8 spaces with a tab, enter 8 into the input box.
Hit select, and it fixes the entire document.
from hq_bot.
i did
from hq_bot.
thats just weird then maybe you didnt save it as the only answer_bot.py file you have on your mac? I am not a pro with this stuff jsut to let you know, but I did exactly what you did and it works fine besides getting syntax errors
from hq_bot.
do I need to download ssl? sorry I am a beginner a this stuff
from hq_bot.
I think I figured it out. my python in terminal is 2.7.4 and I have 3.6.4 installed. i dont know how to change it.
from hq_bot.
It’s ok I’m a beginner to with a little background knowledge but what you can do is “sudo apt-get install python3” in terminal without the quotes and if that doesn’t work I would look it up
from hq_bot.
Did you import ssl? you need to import it in order to use it. Sorry, i though you would know it
from hq_bot.
from hq_bot.
import ssl
at the very beginning where all imports are
from hq_bot.
As well, in terminal if you have python 2 and 3 installed simply typing python3 instead of python will launch python 3.
from hq_bot.
Aw yea Luis I’m an idiot I should have known to do that oops thanks for the help I’ll try it tomorrow
from hq_bot.
from hq_bot.
I did this, but it still does not work. Do you mind posting exactly what yours looks like? I keep on getting 0 as the response :(
from hq_bot.
So this all looks fine with yours but this is how I have it laid out.
This is my get_page method I think you just need to move "return html" to the next line.
As well, Ive just included this to show the tabs. In sublime those lines before the text denote tabs.
from hq_bot.
my bot now looks like this. The sample questions work fine though .
from hq_bot.
That is a new issue that im trying to see how can i solve it. The image taken by the program is too pixelated and can't recognize the real text in it.
from hq_bot.
i was testing off a photo
from hq_bot.
now it is high quality and at first, did the same problem as #48 now it has the same problem again.
from hq_bot.
I am using visual studio code and it says that the code has these problems .
from hq_bot.
we need to fix it for 250,000
from hq_bot.
Yea we have to fix it for the 250k, but I still am receiving 0 for each sample question :(( Were you able to fix the receiving 0 part when you said that the sample questions work now because I did exactly what you did and I'm still getting 0
from hq_bot.
Just saying that I can not open quick time player when Terminal is open. And when I plug my phone into my computer my battery percentage goes up to 100% and stays that way for a while even when it is not plugged in.
from hq_bot.
I am getting the answers but it's taking too long. If any of you guys know how to speed it up please share. And Good Luck to you all.
from hq_bot.
Did anyone find a solution to this? Mine runs with the added/altered lines but returns 0 every single time.
from hq_bot.
Hey guys sampq works for me but when I try 's' for screenshot I get all these errors. How to fix it?
from hq_bot.
Related Issues (20)
- decoding Error while loading up the answer_bot.py HOT 1
- Clever-bot?
- SSL certificate error HOT 1
- Russian translation of the text?
- Installation help
- Android one
- tesseract error in windows HOT 1
- error in running the code HOT 1
- Error searching the answer
- NameError: name 'buffer' is not defined HOT 3
- Idk how to set the coordinates HOT 2
- No module named 'cv2' HOT 3
- How to run the bot after installing?
- How to change language?
- How can I scan HQ when I get eliminated?
- ImportError: cannot import name 'google'
- return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 93: character maps to <undefined>
- Change language to regonize swedish characters
- Selenium 3.141.0 is not compatible
- no module named 'wx'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hq_bot.