#๐Ÿ”’ Help for my first select.select server/client

16 messages ยท Page 1 of 1 (latest)

fleet riverBOT
#

@jade furnace

Python help channel opened

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.

jade furnace
#

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

solid fjord
#

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()
jade furnace
#

i did indeed isolate any problems

jade furnace
jade furnace
#

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

fleet riverBOT
#
Python help channel closed using Discord native close action

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.