#๐ Help for my first select.select server/client
16 messages ยท Page 1 of 1 (latest)
@jade furnace
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
this is the error i'm getting [WinError 10061] No connection could be made because the target machine actively refused it
also i tried to setup smthg similar using a simpler server/client and it worked
Where did you get all this from, ChatGPT? Test each little bit as add it, before you add the next bit, to isolate any problems. And preferably larn the basics of the language you're working in before messing around with sockets and network code, let alone attempting to write a "proper" server.
You're calling an instance method (with self) on the server class. It needs initialising, or refactor out __init__ and make serve neds to be a class method:
class server():
def __init__(self,port=5000):
def serve(self):
if __name__=="__main__":
server().serve()
first i wrote all this by myself step by step ty
i did indeed isolate any problems
as i did learn the basics too
and i don't understnad your point
also, i've figure out my issue a few mins back but forgot to close this
and the issue is as i thought dumb
when i added information to my code
i must have erased my self.server.listen()
it is why it did not work anymore
and why i was wondering why
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.