OwenCochell / Kahoot-Bot

A simple bot made in python that joins a specified Kahoot game and sits idle.
MIT License
5 stars 3 forks source link

Not working #2

Open MambaAgar opened 6 years ago

MambaAgar commented 6 years ago

File "kahoot.py", line 15, in name = input("Please enter a name:") File "", line 1, in NameError: name 'bob' is not defined I used bob as the name when it asked me i tried other names too but nothing works i dont know what this means i have looked at the source and name is clearly defined

OwenCochell commented 6 years ago

Hmmmm that's mighty odd. Are you running the latest version of python(3.7)? What operating system are you running this on? In some versions of Linux, you may have to put '' around the name(This is bad coding on my part, due to the fact that I am not converting the user's input to strings. This bug will be worked out at a later date)when you enter it. For example:

Please enter a name:'bob'

This should do the trick temporarily, but the need for this should dissipate once I update my code. If the issue persists, try re-cloning the repository(Linux) or re-downloading the zip file(Windows). Thanks a lot for pointing this out. If any more bugs rear their ugly heads, please contact me so they can be properly exterminated. Thanks!

Ekstropiya commented 6 years ago

Also when I set the bot amount to 5 and press enter, it gives me this error:

Traceback (most recent call last): File "./Kahoot bot.py", line 23, in <module> driver = webdriver.Chrome(chrome_options=chrome_options) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__ self.service.start() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 83, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

I have downloaded the "chromedriver.exe" and put it in a directory that is included in the system PATH but it still dosen't work.

OwenCochell commented 6 years ago

First things first, as this is a different issue than the one answered above, please open a new issue in the future. Not a big deal, just trying to keep problems and solutions organized. Now, their are a few reasons why this might be happening. For one, this directory might not be included in your path. I personally keep chromedriver.exe in my /bin/ directory, or in my python instillation folder for windows(be sure to select "add python to path" during instillation). Just my personal preference. Also, what operating system are you running? I have had issues with this script on Linux distros that don't have GNOME or any other G.U.I installed. Mainly because: 1. My Linux skills are sub par at best, and 2. because configuring chrome can be difficult. I would recommend downloading chromedriver.exe and put it in the foulders that I recommended. Please contact me if you have any more issues!