attachments = message.attachments
if attachments:
for attachment in attachments:
attachment_data = attachment.read_buffer()
...
than I get an exception:
pypff_attachment_read_buffer: invalid argument read size value less than zero.
If there are no attachements I get Exception:
pypff_message_get_attachments: unable to retrieve number of attachments. libpff_local_descriptors_node_get_entry_data: invalid local descriptors node. libpff_local_descriptors_get_value_by_identifier: unable to retrieve node entry: 0 data. libpff_local_descriptors_tree_get_value_by_identifier: unable to retrieve index value: 1649 from index. libpff_table_get_local_descriptors_value_by_identifier: unable to retrieve local descriptor identifier: 1649. libpff_item_values_get_local_descriptors_value_by_identifier: unable to retrieve local descriptor identifier: 1649. libpff_message_determine_attachments: unable to retrieve local descriptor identifier: 1649. libpff_message_get_number_of_attachments: unable to determine attachments.
I do this:
than I get an exception:
pypff_attachment_read_buffer: invalid argument read size value less than zero.
If there are no attachements I get Exception:
pypff_message_get_attachments: unable to retrieve number of attachments. libpff_local_descriptors_node_get_entry_data: invalid local descriptors node. libpff_local_descriptors_get_value_by_identifier: unable to retrieve node entry: 0 data. libpff_local_descriptors_tree_get_value_by_identifier: unable to retrieve index value: 1649 from index. libpff_table_get_local_descriptors_value_by_identifier: unable to retrieve local descriptor identifier: 1649. libpff_item_values_get_local_descriptors_value_by_identifier: unable to retrieve local descriptor identifier: 1649. libpff_message_determine_attachments: unable to retrieve local descriptor identifier: 1649. libpff_message_get_number_of_attachments: unable to determine attachments.
which is not nice but can be catched.
What can I do to properly get the attachements?