Skip to content

Commit 5ea8d76

Browse files
committed
fix(wdi_login): Remove byte-encoding from split
The question mark that is part of the oauth callback URL is not byte-encoded. Keeping the byte-encoding mark in here leads to ``` response_qs = self.response_qs.split(b'?')[-1] TypeError: must be str or None, not bytes ``` This may differ per platform, but then maybe this PR will spark a discussion that has not yet been started from issue #181
1 parent 069da81 commit 5ea8d76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wikidataintegrator/wdi_login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def continue_oauth(self, oauth_callback_data=None):
248248
self.response_qs = input("Callback URL: ")
249249

250250
# input the url from redirect after authorization
251-
response_qs = self.response_qs.split(b'?')[-1]
251+
response_qs = self.response_qs.split('?')[-1]
252252

253253
# Step 3: Complete -- obtain authorized key/secret for "resource owner"
254254
access_token = self.handshaker.complete(self.request_token, response_qs)

0 commit comments

Comments
 (0)