Uploaded image for project: 'Kopano Groupware Core'
  1. Kopano Groupware Core
  2. KC-1406

optimize-imap.py cannot be run on Kopano 8.7.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 8.7.1
    • Component/s: None
    • Security Level: Public
    • Labels:
      None
    • Environment:
      8.7.0

      Description

      Script still needs to be adapted for python3

      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/kopano/property_.py", line 175, in create_prop
          mapiobj.SetProps([SPropValue(proptag2, value)])
        File "/usr/lib/python3/dist-packages/MAPICore.py", line 404, in SetProps
          return _MAPICore.IMAPIProp_SetProps(self, cValues)
      TypeError: expected bytes, str found
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/usr/share/doc/kopano-gateway/optimize-imap.py", line 56, in <module>
          main()
        File "/usr/share/doc/kopano-gateway/optimize-imap.py", line 52, in main
          generate_imap_message(item)
        File "/usr/share/doc/kopano-gateway/optimize-imap.py", line 25, in generate_imap_message
          item.create_prop(PR_EC_IMAP_BODYSTRUCTURE, bodystructure)
        File "/usr/lib/python3/dist-packages/kopano/properties.py", line 61, in create_prop
          return _prop.create_prop(self, self.mapiobj, proptag, value, proptype)
        File "/usr/lib/python3/dist-packages/kopano/property_.py", line 178, in create_prop
          raise Error('Could not create property, type and value did not match')
      kopano.errors.Error: Could not create property, type and value did not match
      

      reported in https://forum.kopano.io/topic/2138/kopano-backup-email-headers-incomplete-after-restore/2

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            fbartels Felix Bartels
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: