Raymo111 / kahoot-answer-bot

A bot to win Kahoots
189 stars 130 forks source link

Needing Help #2

Closed SilentSpeaker closed 3 years ago

SilentSpeaker commented 4 years ago

So basically when I try to input the "Quiz id" it just says "Traceback (most recent call last): ** IDLE Internal Exception: NameError: name 'requests' is not defined" and I don't really get whats happening so if anyone can respond that would be amazing

Raymo111 commented 4 years ago

Ahh. You have to install python requests.

Raymo111 commented 4 years ago

did you follow the readme instructions? It won't just work if you run it in IDLE

Raymo111 commented 4 years ago

Also are you @Codexx121 as well? Don't make several issues for the same problem. And definitely don't make a new GitHub account every time you make an issue.

Codexx121 commented 4 years ago

@Raymo111 Assuming is bad :( .Well,I dont know him plus his issue is completely different than mine.Its just a concidence that his issue title was the same sort of as mine.

Codexx121 commented 4 years ago

Like i need i a step by step guide. Please Thanks :)

Raymo111 commented 4 years ago

Sorry for the assumption. Did you follow the readme step by step?

SilentSpeaker commented 4 years ago

No i'm not codexx I am just another random sorry for the inconvenience

Raymo111 commented 4 years ago

Sorry guys I made the mistake of assuming you were 1 person. You both seem to have the same issue though. Read throught the README.md file in the root folder of the repo very carefully, and then come back with any specific issues.

SilentSpeaker commented 4 years ago

Ok thanks man. That really helped :) Also thanks for replying really fast.

Raymo111 commented 4 years ago

You're welcome :) I have email and push notifications on so I always try to respond before you leave the page lol.

Edit: also I think and type fast :)

SilentSpeaker commented 4 years ago

hey do you know what to do when you get to the part where you write "python3 -m pip install -r requirements.txt" in the command box? Idk if I am doing this right because I am watching a tutorial on how to install requests but it doesn't say what to write in the command box in the "readme.md" so I tried to write their message and theirs is "pip install beautifulsoup4" but I changed the beautifulsoup4 part to kbot but that didnt work so I don't know if its a different process or what but I was able to do everything they are doing up until that point. Also the video was made in Feb 16, 2018 so it might be out dated.

SilentSpeaker commented 4 years ago

Also when I tried to type "python3 -m pip install -r requirements.txt" in the command box it gave me a error message saying "ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt' WARNING: You are using pip version 20.1.1; however, version 20.2.2 is available You should consider upgrading via the 'c:\users\personal stuff(not the actual file name)\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.

Raymo111 commented 4 years ago

Ok so you need to open a command in the folder that you have the files in, and then run the python3 -m pip install -r requirements.txt command. requirements.txt is a file in the repo, and you need to get python to install the dependencies in it. You don't need to run any other pip install commands.

SilentSpeaker commented 4 years ago

I finally got it to work but now how do I get myself into the game? I found the quizid and now it doesnt say anything it only says the id and then I need to type something what do I do?

Raymo111 commented 4 years ago

Great! What flags are you using to run the program?

SilentSpeaker commented 4 years ago

What do you mean by flags? Sorry if this is a dumb question i'm still pretty new to coding

Raymo111 commented 4 years ago

No, I understand. It's not a dumb question flags are options that you use to specify how you're running the program. For example, if you were to run python3 kbot -n silentspeaker -p 1234, the -n silentspeaker is one flag, and -p 1234 is another.

Raymo111 commented 4 years ago

Are you running the program with any flags?

SilentSpeaker commented 4 years ago

yes I think that there are 2 of them one is -m pip install and -r requirements.txt

SilentSpeaker commented 4 years ago

I think but i'm not completely sure

Raymo111 commented 4 years ago

Correct, those are the flags you used when installing the requirements. What flags (if any) did you use when you ran the program? Did you do something like python3 kbot -n silentspeaker? (Or did you just do python3 kbot by itself)

SilentSpeaker commented 4 years ago

By 'when you ran the program" do you mean the code in IDLE or in the command box?

Raymo111 commented 4 years ago

Ok I'll rephrase my question. What were the exact steps that you took to get to the id part?

Raymo111 commented 4 years ago

Also you don't need to run it in IDLE, and you shouldn't. Just run it in a command prompt.

SilentSpeaker commented 4 years ago

I dont know how to run it in a command promt thats why I used IDLE but the steps I took were Install dependencies? [y/N] > y name > 5 pin > 4567373 quizID >4918

Raymo111 commented 4 years ago

Hmmm... I don't think you ran it with any flags then. Did you literally use 4918 as your QuizID? That's not a valid quizID. Can you send a screenshot?

SilentSpeaker commented 4 years ago

So Basically the quizid that worked was 4918 because everything before and after said "invalid syntax" so I did that and it worked.

SilentSpeaker commented 4 years ago

also ill send the screenshot

SilentSpeaker commented 4 years ago

Capture

SilentSpeaker commented 4 years ago

thats how I got it

Raymo111 commented 4 years ago

Ahh ok. So the syntax error is because you're now running commands in python. When you see >>> that means you've exited the program and need to run it again. Your first quizID was fine, but you're missing a character at the end. Double-check the quizID.

SilentSpeaker commented 4 years ago

ok ill make sure that i check it

SilentSpeaker commented 4 years ago

Ok I did it again and it says the same thing

Raymo111 commented 4 years ago

Make sure your quizID is in the 8x-4x-4x-4x-12x format. Last time your final section only had 11 characters, not 12. Note that 4x means 4 characters (i.e. v9j8)

SilentSpeaker commented 4 years ago

ok so it is in the format I just counted and double checked but it still wont work

SilentSpeaker commented 4 years ago

Wait I forgot to restart the program let me check again

SilentSpeaker commented 4 years ago

Still wont work It still says invalid syntax

Raymo111 commented 4 years ago

Use a screenshot to accompany any problem moving forward. Like I explained above, syntax error means you're not in the program anymore. You need to run the program again. Send a screenshot.

SilentSpeaker commented 4 years ago

ok makes sense sorry if this is really annoying.

Raymo111 commented 4 years ago

Did you get it to work?

Codexx121 commented 4 years ago

Ayo @SilentSpeaker Can you tell me how you installed the depencies and done the quiz stuff please it would help a lot? 👍

1n23 commented 3 years ago

It doesn't say specifically how to use it. (I use windows) (I have python 3, Pip and Visual Studio Build Tools 2019) I am also confused about this link. (https://repl.it/repls/WholeCrimsonFlashdrives) Thanks 🙂👍! (good job on continuing the bot)

Raymo111 commented 3 years ago

@yeboiiii The README says exactly how to use it, including specifically on Windows.

The link is how we deal with authentication on Kahoot's end, out doesn't pertain to you unless the project is broken and you're trying to fix it.

What specific step are you stuck on? What did are you getting?

Don't just say "aahhh the instructions look too confusing I'm gonna go and cry about it". Find out what step you're stuck on, what the error is, and figure out why you're getting it. Only then will you improve. Only then should you file/ comment on an issue, with specific details, preferably with screenshots to clarify things.

1n23 commented 3 years ago

Sorry about that, I restarted my laptop then it worked. (It wasn't working yesterday) Can you make it possible to take over your user. (instead of making a new one) (I hope it is possible to detect the id from the pin) (It would also be nice if it just restarted when it is done with the quiz) Thanks. Sorry about that.

Raymo111 commented 3 years ago

@yeboiiii

Can you make it possible to take over your user.

No, because that's not how websockets stations work.

It would also be nice if it just restarted when it is done with the quiz

I have no idea what this means.

Thanks. Sorry about that.

No worries, just make sure you don't make the same mistake somewhere else where they're not as nice as I am.

Raymo111 commented 3 years ago

I'm closing this issue and disabling further comments. If anyone had suggestions or further problems feel free to make a new issue.