-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
I ran the same droopy.py with Python 2 then Python 3.
--auth works as expected with Python 2.
With Python 3.6.4 on Win 7 -64bit, I get this error:
>python droopy.py --auth test:testException happened during processing of request from ('127.0.0.1', 53806)
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\socketserver.py", line 639, in process_request_thread
self.finish_request(request, client_address)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\socketserver.py", line 696, in __init__
self.handle()
File "droopy.py", line 352, in handle
httpserver.BaseHTTPRequestHandler.handle(self)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\http\server.py", line 418, in handle
self.handle_one_request()
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\http\server.py", line 406, in handle_one_request
method()
File "droopy.py", line 77, in decorated
expected = 'Basic ' + base64.b64encode(self.auth)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'Metadata
Metadata
Assignees
Labels
No labels