Ladislav: > Hello, > My program sometimes raise the exception > > socket.error: (10061, 'Connection refused') > > How can I handle this kind of exception? try: # your code that's failing except: # what you want to do when it fails // mark