Ask coding questions

← Back to all posts
The script doesn't run
Rohan0165 (0)

Hii the script doesn't run even when i've clicked the run button like 10 times.

Comments
hotnewtop
QuantumCodes (26)

I am able to run... (error showing up)

InvisibleOne (3226)

the problem is in your webserver.py you need to not have the line running your webserver in a function.

QuantumCodes (26)

But he is threading it right? There is Thread(target=run) which will run the run() [email protected]

InvisibleOne (3226)

Yeah... well maybe you have to do t.start() and then t.join() to join it to the main thread so the code runs a parallel @QuantumCodes

QuantumCodes (26)

If younare importing the function on another file which runs that thread function, then below there is the other scriot that rins parallel, then it works just fine without t.join() i did the same in my pinger(WIP) @InvisibleOne

InvisibleOne (3226)

yeah you have the same keep alive code as I use and it's worked, it must be something else. @QuantumCodes

InvisibleOne (3226)

From running the code now, the only issue I see is that you need to import dns because you need dnspython to connect to a mongodb.