Skip to content

Commit a071e7d

Browse files
Added .decode('utf-8') since we need a string
1 parent 5d61ea7 commit a071e7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

twocaptcha/solver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def get_method(self, file):
438438
img_resp = requests.get(file)
439439
if img_resp.status_code != 200:
440440
raise ValidationException(f'File could not be downloaded from url: {file}')
441-
return {'method': 'base64', 'body': b64encode(img_resp.content)}
441+
return {'method': 'base64', 'body': b64encode(img_resp.content).decode('utf-8')}
442442

443443
if not os.path.exists(file):
444444
raise ValidationException(f'File not found: {file}')

0 commit comments

Comments
 (0)