How "File not open a bytes-like object is required, not 'int' " could be solved?
<p>I am writing a simple http server code using socket-network-programming as a way of connection between client-server nodes.</p>

<p>simply, I used my browser as client and I coded server side using python. </p>

<p>Now, everything seems right but when I run the server plus browser with specific path 'filename',like (http//:localhost:8080/filename) the browser gets my exception statement that is:
    404 Not Found</p>

<p>I believe my trouble is here:
    client_socket.send("HTTP/1.1 200 OK\r\n\r\n".encode())</p>

<p>The following error appears on server terminal console screen.</p>

<pre><code>File not open  a bytes-like object is required, not 'int'
</code></pre>

<p>Any help or though is appreciated.</p>