mirror of
https://github.com/lepture/captcha.git
synced 2026-03-13 09:43:22 +08:00
Fix raised 'TypeError: must be str, not bytearray' when saving audio file in Python 3.4.3.
This commit is contained in:
@@ -278,5 +278,5 @@ class AudioCaptcha(object):
|
||||
:param output: output destionation.
|
||||
"""
|
||||
data = self.generate(chars)
|
||||
with open(output, 'w') as f:
|
||||
with open(output, 'wb') as f:
|
||||
return f.write(data)
|
||||
|
||||
Reference in New Issue
Block a user