New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String with encode causing addition of 'b' in the beginning #85296
Comments
I am trying to run the attached code. when hard-coding the string in the URL and doing .encode, then the code works. However since i am requesting user input, i cannot hard-code and the code seem to add the 'b' character in the beginning causing the request to fail with output like this Enter Hostname : after encode 0 i cannot pass without .encode to the socket communication. is this reported problem ? |
Your request is likely failing for entirely different reasons. What you've done is encoded a str object into bytes object, which is represented with as literal using b prefix. It isn't being sent over the socket. |
if you look at my code, couple of lines below the print, i am actually Thanks for your help On Thu, Jun 25, 2020 at 10:37 PM SilentGhost <report@bugs.python.org> wrote:
-- Srinivas Sampath |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: