Python error

I am trying to run tests for a websocket server in python and it shows me a weird error about not being able to bind to requested address which weirdly enough is localhost. Tests work for me.