Skip to content
Sign upLog in
← Back to Community

Webbot not working

Profile icon
Coder100Hacker

So, with Polygott, I ran the command:

pip3 install webbot

which worked fine.

[insert install prompt]

However, in index.py
when I ran

""" ... ... ... ... ... ... """ import webbot web = webbot.Browser() web.go_to("https://repl.it") while True: print(input("Finished."))

It said module webbot is not found :(
Can someone please tell me what when wrong? Thanks!

Answered by Giothecoder [earned 5 cycles]
View Answer
Voters
Profile icon
Spotandjake
Profile icon
Wilke000
Profile icon
forceofyoda
Profile icon
dabs364
Profile icon
SkywayDeveloper
Profile icon
cmaofficialcomp
Profile icon
JunhaoZhang1
Profile icon
Coder100
Comments
hotnewtop
Profile icon
Giothecoder

It isn’t a permanent install because security, so you’ll have to install it every time

Profile icon
Coder100

What do you mean by that? How can I fix it then?

@Giothecoder

Profile icon
Coder100

I could do the same for express with node.js, so what's the exception with python?

@Giothecoder

Profile icon
Giothecoder

@Coder100
there isn’t one, the same would happen for node packages. All you have to do is make sure to install the packages each time. So now instead of installing it once, just install it every time so instead of having
python index.py
It’ll be
pip3 install webbot ; python index.py

If you can figure out how to check for you dependencies, do it - it’s really the only way of doing this efficiently, but otherwise just install everything every time instead,

Profile icon
Coder100

Ok. Thanks!

@Giothecoder

Profile icon
Coder100

Oh, I see why the node.js works: I have a package.json that specifies express, so do you know a way that is the same with python?

@Giothecoder

Profile icon
Giothecoder

@Coder100
yes I think, you use a requirements.txt file with just a list of the pkgs

Profile icon
Coder100

Ok, this is so annoying ugh I can get colored, but not webbot argh

@Giothecoder

Profile icon
Giothecoder

@Coder100
I don’t think so, it actually looks like it doesn’t work for colored because when I run it it says it can’t find a module named colored

Profile icon
Coder100

Huh, weird it worked for me

@Giothecoder

Profile icon
Giothecoder

@Coder100
really? What error are you getting? This is a strange situation lol

Profile icon
Coder100

I'm not getting an error, I just see orange hello world message (sort of unexpected since background is supposed to be yellow, but I guess that's just a terminal thing)

@Giothecoder

Profile icon
Giothecoder

Is that supposed to happen?

@Coder100

Profile icon
Coder100

Yeah pretty sure, I tested it before on a python project and that was the same result

@Giothecoder

Profile icon
Giothecoder

@Coder100
oh ok, so what the problem then again? Little confused now lol

Profile icon
Coder100

Things that open up application windows like webbot and py game don't want to work however terminal things like colored do work makes since that's kind of confusing lol I'll try flask now

@Giothecoder

Profile icon
Giothecoder
Profile icon
Coder100

Flask doesn't work either :(

@Giothecoder

Profile icon
Giothecoder

Darnnn what is this blech

@Coder100

Profile icon
Coder100

IKR I'll dm the devs on discord, maybe it's just a bug lol

@Giothecoder

Profile icon
Giothecoder

@Coder100
maybe... what if you tried transferring the code to a pygame repl and using pygame and just configuring the run button?

Profile icon
Coder100

Ok I'll try that

@Giothecoder

Profile icon
Giothecoder

@Coder100
🤞 fingers crossed hope that helps.

Profile icon
Coder100

It works! However I don't know what to do next

@Giothecoder

Profile icon
Giothecoder

@Coder100
what do you mean? For what?

Profile icon
Coder100

For transferring the successful test to polygott

@Giothecoder

Profile icon
Giothecoder

@Coder100
um. Quick question why are you using a polygott repl? You may not necessarily need it.

Profile icon
Coder100

I would use it for node.js puppeteer until repl.it makes a way to do so otherwise

@Giothecoder

Profile icon
Giothecoder

@Coder100
there is another way. Just configure the run button with a .replit file

Profile icon
Coder100

What do you mean?

@Giothecoder

Profile icon
Giothecoder

@Coder100
you make a file called .replit, and then in that file you put
run="commands" where commands are the things you want the repl to do when you click run. An example would be some thing like

main.py

print("hello world");

.replit

run="python main.py"

Edit: the commands are just bash commands, it’s the same exact range of function as the polygott repl for which you were using it.

Profile icon
Coder100

Ok I'll try that

@Giothecoder

Profile icon
Giothecoder

@Coder100
cool. Should work now lol.

Profile icon
Coder100

Thanks! Any way to add more lines?

@Giothecoder

Profile icon
Giothecoder

@Coder100
yeah, just put a semicolon like you would in bash:
node index.js ; python main.py ; echo done

Profile icon
Coder100

Ok. Thank you!

@Giothecoder

Profile icon
Giothecoder

@Coder100
yw! Happy coding. :)