Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[WinError 10061] No connection could be made because the target machine actively refused it

Aperta
#271 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
networking

Direzione di ricerca

Start by reproducing the posted server and client programs on the two Windows PCs, focusing on the socket.bind and socket.connect calls. Compare the host address used by the server with the address entered by the client and verify that the server is reachable; done means the connection succeeds or the issue is shown to be unrelated to this library.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi, so I've been trying to code a file transfer program in python and it worked preety well on my pc (for now I only tested it with a txt file but I think it'll work with other files too), but the problem is when I tried running it on my brothers pc WinError 10061 popped up, I've done quite a bit of research before writing this and the common running the server before the client method doesn't work on my pc, I also tried turning off my antivirus thinking it blocked it but that didn't do anything either.
I don't really know what to do anymore so I came looking for help here. I hope somebody can help me

Here is the server program code:
import socket
s = socket.socket()
host = socket.gethostname()
port = 8080
s.bind((host,port))
s.listen(1)
print(host)
print("Waitning for any incoming connections ...")
conn, addr = s.accept()
print(addr, "Has connected to the server")

filename = input(str("Please enter the filename of the file : "))
file = open(filename , 'rb')
file_data = file.read(1024)
conn.send(file_data)
print("Data has been transmitted successfully")

And here is the client program code:
import socket
s = socket.socket()
host = input(str("Please enter the host adress of the sender : "))
port = 8080
s.connect((host,port))
print("Connected ... ")

filename = input(str("Please enter a filename for the incoming file : "))
file = open(filename, 'wb')
file_data = s.recv(1024)
file.write(file_data)
file.close()
print("File has been received successfully")

Lingua principale
Python
Stelle
1.1k
Fork
285
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Lawouach/WebSocket-for-Python

Tutte le issue di Lawouach/WebSocket-for-Python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.