OSError: No socket could be created — ((‘0.0.0.0’, 8080): [WinError 10048] Resolved.
While using webpy or web.py the most common error we face is getting this error:
OSError: No socket could be created — ((‘0.0.0.0’, 8080): [WinError 10048]
Even I faced this type of error and searched for online resources but didn’t get any help out of it.
Do Read: How To Delete The Last Blank Page In Word
So, I randomly tried various things taking help from my senior and the error resolved.
import web
urls = (
'/(.*)', 'hello'
)
app = web.application(urls, globals())
class hello:
def GET(self, name):
if not name:
name = 'World'
return 'Hello, ' + name + '!'
if __name__ == "__main__":
app.run()
I wrote the above program and when I executed it, the terminal showed me an error. OSError: No socket could be created — ((‘0.0.0.0’, 8080): [WinError 10048].
I usually code in VS code. If you haven’t downloaded, download it. It’s the best code editor.
Solution:

To solve this issue:
In VS CODE: RUN AGAIN THE ENTIRE PROGRAM AND WHEN THE ERROR COMES, TYPE IN THE TERMINAL: PYTHON FILENAME and any 4 or 5 digit number.
SO IN MY CASE, I WROTE python main.py 1234 and then press Enter. After this In the browser type localhost:1234

It works 100% if you still have any query put them in the comment section or Dm me on Instagram: Akash Jha

Hope you find the content helpful.
Read Daily Blogs at Daily Blog Day
Pingback: Kareena Kapoor Flaunts Baby Bump in her Yoga Session - Daily Blog day