This is the simple program I am trying to run which shows error. If I pass URL without whitespace, then the program runs properly.
Error: 404 Bad Request.
If instead of "Hey You", I pass "Hey%20You". The program runs correctly.
You can pass the string to urllib.parse.quote to handle the escaping of special characters such as the space.