Fixes issue binascii.Error: Non-base16 digit found
# pylint: disable=no-member,not-an-iterable
import base64
+import binascii
import cgi
import copy
import csv
@@ -1958,7 +1959,7 @@ class Field(Expression, Serializable):
try:
filename = base64.b16decode(m.group('name'), True).decode('utf-8')
filename = re.sub(REGEX_UPLOAD_CLEANUP, '_', filename)
- except (TypeError, AttributeError):
+ except (TypeError, AttributeError, binascii.Error):
filename = name
else:
filename = name
