Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Python scripts from core 8.7.80.402 + 424 on Debian 9

    Kopano Groupware Core
    3
    3
    221
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • holibert
      holibert last edited by

      Hi,

      in both versions the Python scripts kopano-localize-folders and kopano-mailbox-permissions throw an error.

      Traceback (most recent call last):
        File "/usr/sbin/kopano-localize-folders", line 114, in <module>
          main()
        File "/usr/sbin/kopano-localize-folders", line 88, in main
          print('%s: Changing localized folder names to \"%s\"' % (user.name.decode('utf-8'), options.lang))
      AttributeError: 'str' object has no attribute 'decode'
      
      Traceback (most recent call last):
        File "/usr/sbin/kopano-mailbox-permissions", line 1002, in <module>
          sys.exit(main())
        File "/usr/sbin/kopano-mailbox-permissions", line 995, in main
          printUserMailBoxPermissions(session, showall, args)
        File "/usr/sbin/kopano-mailbox-permissions", line 815, in printUserMailBoxPermissions
          store = getStore(session, user)
        File "/usr/sbin/kopano-mailbox-permissions", line 240, in getStore
          usereid = UserAccountsToEntryIDs(session, [username])[0][0]
        File "/usr/sbin/kopano-mailbox-permissions", line 259, in UserAccountsToEntryIDs
          gab = getGlobalAddressbook(session)
        File "/usr/sbin/kopano-mailbox-permissions", line 129, in getGlobalAddressbook
          SPropertyRestriction(RELOP_EQ, PR_AB_PROVIDER_ID, SPropValue(PR_AB_PROVIDER_ID, 'AC21A95040D3EE48B319FBA753304425'.decode('hex'))), # MUIDECSAB
      AttributeError: 'str' object has no attribute 'decode'
      

      Any hint for making it work again?

      Thank you

      1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels Kopano last edited by

        Hello @holibert ,

        thanks for the report. Master was recently switched to run everything with python3, but not all helper scripts have been updated yet to be compatible with python3.

        For the moment you could explicitly run the script with python2. If you know python then a pr is also appreciated (but we will also get to it eventually). See https://stash.kopano.io/projects/KC/repos/kopanocore/browse/CONTRIBUTING.md for instructions.

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        1 Reply Last reply Reply Quote 0
        • mark dufour
          mark dufour last edited by

          sorry for this, looks like we missed these somehow when testing with python3. I made a PR for kopano-localize-folders. about the other script, would the new kopano-cli also work for your purposes…? (“kopano-cli -u userX” also shows permissions).

          1 Reply Last reply Reply Quote 0
          • First post
            Last post