Error: Invalid base64-encoded string: number of data characters (233293) cannot be 1 more than a multiple of 4
I'm currentyl trying to move from radicale 1.1 to radicale 2 and I'm getting some error after migrating my data from radicale 1.1 to radicale 2:
2021-03-15 00:26:26,371 - ERROR: An exception occurred during PROPFIND request on '/user/': Failed to load item '4abcf83ede4ba778b25d7e51040db7016c2c0ff057d38ae4d9abf19922ebf38b.vcf' in 'user/addressbook.vcf': decoding with 'base64' codec failed (Error: Invalid base64-encoded string: number of data characters (233293) cannot be 1 more than a multiple of 4) Traceback (most recent call last): File "/usr/lib/python3.7/encodings/base64_codec.py", line 19, in base64_decode return (base64.decodebytes(input), len(input)) File "/usr/lib/python3.7/base64.py", line 546, in decodebytes return binascii.a2b_base64(s) binascii.Error: Invalid base64-encoded string: number of data characters (233293) cannot be 1 more than a multiple of 4
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/radicale/storage.py", line 1417, in _get_with_metadata raw_text.decode(self._encoding))) File "/usr/lib/python3/dist-packages/vobject/base.py", line 1120, in readComponents component.setBehaviorFromVersionLine(versionLine) File "/usr/lib/python3/dist-packages/vobject/base.py", line 663, in setBehaviorFromVersionLine self.setBehavior(v) File "/usr/lib/python3/dist-packages/vobject/base.py", line 170, in setBehavior obj.autoBehavior(True) File "/usr/lib/python3/dist-packages/vobject/base.py", line 156, in autoBehavior self.behavior.decode(self) File "/usr/lib/python3/dist-packages/vobject/vcard.py", line 143, in decode line.value = codecs.decode(line.value.encode("utf-8"), "base64") binascii.Error: decoding with 'base64' codec failed (Error: Invalid base64-encoded string: number of data characters (233293) cannot be 1 more than a multiple of 4)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/radicale/init.py", line 332, in call status, headers, answers = self._handle_request(environ) File "/usr/lib/python3/dist-packages/radicale/init.py", line 505, in _handle_request environ, base_prefix, path, user) File "/usr/lib/python3/dist-packages/radicale/init.py", line 813, in do_PROPFIND base_prefix, path, xml_content, read_items, write_items, user) File "/usr/lib/python3/dist-packages/radicale/xmlutils.py", line 812, in propfind allprop=allprop, propname=propname) File "/usr/lib/python3/dist-packages/radicale/xmlutils.py", line 1035, in _propfind_response element.text, _ = item.sync() File "/usr/lib/python3/dist-packages/radicale/storage.py", line 1205, in sync ((href, None) for href in self._get_deleted_history_hrefs())): File "/usr/lib/python3/dist-packages/radicale/storage.py", line 1204, in
((item.href, item) for item in self.get_all()), File "/usr/lib/python3/dist-packages/radicale/storage.py", line 1464, in return (self.get(href, verify_href=False) for href in self.list()) File "/usr/lib/python3/dist-packages/radicale/storage.py", line 1282, in get item, metadata = self._get_with_metadata(href, verify_href=verify_href) File "/usr/lib/python3/dist-packages/radicale/storage.py", line 1429, in _get_with_metadata (href, self.path, e)) from e RuntimeError: Failed to load item '4abcf83ede4ba778b25d7e51040db7016c2c0ff057d38ae4d9abf19922ebf38b.vcf' in 'user/addressbook.vcf': decoding with 'base64' codec failed (Error: Invalid base64-encoded string: number of data characters (233293) cannot be 1 more than a multiple of 4)
I don't know how to debug this problem further. Can you please help me for that?
Could this be due to an image in the adressebook with the wrong format? (png, jpg...)