python - How "File not open a bytes-like object is required, not 'int' " could be solved? -


i writing simple http server code using socket-network-programming way of connection between client-server nodes.

simply, used browser client , coded server side using python.

now, seems right when run server plus browser specific path 'filename',like (http//:localhost:8080/filename) browser gets exception statement is: 404 not found

i believe trouble here: client_socket.send("http/1.1 200 ok\r\n\r\n".encode())

the following error appears on server terminal console screen.

file not open  bytes-like object required, not 'int' 

any or though appreciated.

the problem simple. did after lot of digging on internet following: client_socket.send("http/1.1 200 ok\n".encode())

sincerely


Comments