close

[Solved] Python -How to solve OSError: [Errno 22] Invalid argument

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Python -How to solve OSError: [Errno 22] Invalid argument in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Python -How to solve OSError: [Errno 22] Invalid argument Error Occurs?

Today I get the following error Python -How to solve OSError: [Errno 22] Invalid argument in Python.

How To Solve Python -How to solve OSError: [Errno 22] Invalid argument Error ?

  1. How To Solve Python -How to solve OSError: [Errno 22] Invalid argument Error ?

    To Solve Python -How to solve OSError: [Errno 22] Invalid argument Error it seams that your port 5000 have a another process. so you can changing your port in a script for ruining the application. in last line of your code add “port” Variable like this:

  2. Python -How to solve OSError: [Errno 22] Invalid argument

    To Solve Python -How to solve OSError: [Errno 22] Invalid argument Error it seams that your port 5000 have a another process. so you can changing your port in a script for ruining the application. in last line of your code add “port” Variable like this:

Solution 1

The port 5000 is being used by another process. To check what process holds the port 5000, do:

sudo netstat -anp | grep ':5000 '

and kill the process.

Solution 2


it seams that your port 5000 have a another process. so you can changing your port in a script for ruining the application. in last line of your code add “port” Variable like this:

if __name__ == '__main__':
     app.run(debug=True, host="0.0.0.0", port=8000)

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment