Socket.error: [Errno 98] Address already in use

user:~/webpage_ws$ python -m SimpleHTTPServer 7000
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/usr/lib/python2.7/SimpleHTTPServer.py”, line 235, in
test()
File “/usr/lib/python2.7/SimpleHTTPServer.py”, line 231, in test
BaseHTTPServer.test(HandlerClass, ServerClass)
File “/usr/lib/python2.7/BaseHTTPServer.py”, line 606, in test
httpd = ServerClass(server_address, HandlerClass)
File “/usr/lib/python2.7/SocketServer.py”, line 417, in init
self.server_bind()
File “/usr/lib/python2.7/BaseHTTPServer.py”, line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File “/usr/lib/python2.7/SocketServer.py”, line 431, in server_bind
self.socket.bind(self.server_address)
File “/usr/lib/python2.7/socket.py”, line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

Hi @miumama,

It means the port 7000 is busy with another process.
You can check if there is a process there using the command:
sudo lsof -i :7000

You can also check that you don’t have the same process running in a different terminal.

Please, let me know if it helped you.