In my table I have Field('GRAPH'). In database (firebird 2.5) type if this field is BLOB. But if in tables.py I indicate that field as blob then web2py return error: <class 'binascii.Error'> Invalid base64-encoded string: number of data characters (17) cannot be 1 more than a multiple of 4Версия web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03 Python Python 3.7.3: C:\Python\python.exe (prefix: C:\Python) Error snapshot [image: help] <http://127.0.0.1:8000/admin/default/ticket/Timetable/127.0.0.1.2019-10-17.10-56-54.ab169b0c-561c-485c-a8c9-fcdc23fc35ad#>
Error(Invalid base64-encoded string: number of data characters (17) cannot be 1 more than a multiple of 4) Function argument list (s=b'\x01\x00\x00\x00\x03\x00\x00\x00\x00\xc0W\xe5@...0\x00\x00`\x7f\xe5@\x00\x00\x00\x00\x00\x85\xe5@', altchars=None, validate=False) Code listing 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. altchars = _bytes_from_decode_data(altchars) assert len(altchars) == 2, repr(altchars) s = s.translate(bytes.maketrans(altchars, b'+/')) if validate and not re.match(b'^[A-Za-z0-9+/]*={0,2}$', s): raise binascii.Error('Non-base64 digit found') return binascii.a2b_base64(s) def standard_b64encode(s): """Encode bytes-like object s using the standard Base64 alphabet. Variables global binascii <module 'binascii' (built-in)> binascii.a2b_base64 <built-in function a2b_base64> s b'\x01\x00\x00\x00\x03\x00\x00\x00\x00\xc0W\xe5@...0\x00\x00`\x7f\xe5@\x00\x00\x00\x00\x00\x85\xe5@'It's not problem because if I not indicate type for that field I can do my query. It's interesting why web2py reading base64 string, because blob is not always base64. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/f5179bd6-6544-4df8-9b70-1caadacb41f1%40googlegroups.com.