diff --git a/wikitools3/api.py b/wikitools3/api.py index 6ba2e5a..25d305e 100644 --- a/wikitools3/api.py +++ b/wikitools3/api.py @@ -96,7 +96,7 @@ def __init__(self, wiki, data, write=False, multipart=False): self.response = False if wiki.auth: self.headers["Authorization"] = "Basic {0}".format( - base64.encodestring(f"{wiki.auth}:{wiki.httppass}") + base64.encodestring(f"{wiki.auth}:{wiki.httppass}".encode()).decode() ).replace("\n", "") if hasattr(wiki, "passman"): self.opener = urllib.request.build_opener(