klaemo opened a new issue #1899: couchup crashing when run with python3 URL: https://github.com/apache/couchdb/issues/1899 ## Description Trying to run `couchup` with the login and password params crashes the program: ```sh couchup replicate -a --login admin --password <my-password> Starting replication for event-4e616368746469676974616c203139... Traceback (most recent call last): File "./bin/couchup", line 508, in <module> main(sys.argv) File "./bin/couchup", line 502, in main args.func(args) File "./bin/couchup", line 223, in _replicate auth = 'Basic ' + base64.b64encode(':'.join(args['creds'])) File "/usr/lib/python3.6/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str ``` ## Steps to Reproduce `couchup replicate -a --login admin --password <my-password>` ## Expected Behaviour `couchup` should not crash ## Your Environment - Ubuntu 18.04.1 - `python --version Python 2.7.15rc1`, - `python3 --version Python 3.6.7` - fresh CouchDB 2.3.0 install from the couch repo ## Additional context I'm not familiar with python, but it looks like couchup is passing a string to `base64.b64encode`. Which is fine in python2, but as far as I can tell [pyton3 expects a bytes-like object](https://docs.python.org/3.5/library/base64.html#base64.b64encode). Discussed this on slack a little: https://couchdb.slack.com/archives/C49LEE7NW/p1549215509673600
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
