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

    movetopublic.py failing with 'error: initial_value must be unicode or None, not str' on CentOS7

    Kopano Groupware Core
    1
    1
    177
    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.
    • cusard
      cusard last edited by

      Problem: movetopublic.py failing with 'error: initial_value must be unicode or None, not str’

      System:

      • CentOS Linux release 7.6.1810 (Core)
      • PHP 5.4.16
      • Python 2.7.5 (default)
      • Python 3.6.3 (additionally installed with SCL)
      • Kopano 8.7.3.0-30.1
      • Samba 4 user backend with kopano schema

      Setup:

      • Created Public Store ($ /usr/sbin/kopano-cli --create-store)
      • Created Public Folder in the Webapp and set respective permissions, here ‘pftestfolder’
      • Created not-active ‘Shared store only’ user with respective E-Mail addresses, here ‘pftestuser’ with ‘pftestuser@test.org’
      • Enable move to public plugin ($ ln -s /usr/share/kopano-dagent/python/plugins/movetopublic.py /var/lib/kopano/dagent/plugins/movetopublic.py)
      • Copied config ($ cp /usr/share/kopano-dagent/python/plugins/movetopublic.cfg /etc/kopano/movetopublic.cfg)
      • Configuration movetopublic.cfg:
        rule1_recipient = pftestuser
        rule1_destination_folder = pftestfolder
      • Restart dagent ($ systemctl restart kopano-dagent)

      Error Details:

      Jul  2 12:49:18 upv-agbk-kmx001 kopano-spooler[4180]: Starting kopano-spooler version 8.7.3.0 (pid 4180 uid 997)
      Jul  2 12:49:19 upv-agbk-kmx001 postfix/smtpd[4183]: connect from localhost[::1]
      Jul  2 12:49:19 upv-agbk-kmx001 postfix/smtpd[4183]: 1BC15106A461: client=localhost[::1]
      Jul  2 12:49:19 upv-agbk-kmx001 postfix/cleanup[4186]: 1BC15106A461: message-id=<kcRK.0000000051132162958b43ff90c92d7044c013b301000000050000008b70c984802f42f8a7e52344dea8392800000000.1d530c3.cccc6180@mail>
      Jul  2 12:49:19 upv-agbk-kmx001 postfix/qmgr[3639]: 1BC15106A461: from=<mailsender@test.org>, size=1208, nrcpt=1 (queue active)
      Jul  2 12:49:19 upv-agbk-kmx001 postfix/smtpd[4183]: disconnect from localhost[::1]
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4105]: Accepted connection from [::ffff:127.0.0.1]:59706
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Starting worker for LMTP request pid 4188
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Kopano Directory Service"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Private Folders"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Public Folders"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 220 2.1.5 LMTP server is ready
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: > LHLO mail.test.org
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: LHLO ID: mail.test.org
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250-SERVER ready
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250-PIPELINING
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250-8BITMIME
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250-ENHANCEDSTATUSCODE
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250-RSET
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250 SMTPUTF8
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: > MAIL FROM:<mailsender@test.org>
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250 2.1.0 Ok
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: > RCPT TO:<pftestuser@test.org>
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Resolved command "RCPT TO:<pftestuser@test.org>" to recipient address "pftestuser@test.org"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Resolved recipient pftestuser@test.org as user pftestuser
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250 2.1.5 Ok
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: > DATA
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 354 2.1.5 Start mail input; end with <CRLF>.<CRLF>
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: PYTHONPATH = /usr/share/kopano-dagent/python
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * Loading plugins started
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: ** Checking plugins in /var/lib/kopano/dagent/plugins
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: ** Inspecting file 'movetopublic.py'
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: !-- failed to load: /var/lib/kopano/dagent/plugins/movetopublic.py
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: !-- error: initial_value must be unicode or None, not str
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * Loading plugins done
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Kopano Directory Service"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Private Folders"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Public Folders"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Kopano Directory Service"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Private Folders"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Public Folders"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Mail will be delivered in Inbox
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: HTML4 meta tag found: charset="text/html; charset=utf-8"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: HTML charset adjusted to "utf-8"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: renovate_encoding: reading data using charset "utf-8" succeeded.
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * PostConverting processing started
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * PostConverting processing done
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * PreDelivery processing started
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * PreDelivery processing done
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Kopano Directory Service"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Private Folders"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Initializing provider "Public Folders"
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * PreRuleProcess processing started
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * PreRuleProcess processing done
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Target user has OOF inactive
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * PostDelivery processing started
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * PostDelivery processing done
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * SendNewMailNotify processing started
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: * SendNewMailNotify processing done
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Send 'New Mail' notification
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Delivered message to "pftestuser", Subject: "Testmail", Message-Id: <kcRK.0000000051132162958b43ff90c92d7044c013b301000000050000008b70c984802f42f8a7e52344dea8392800000000.1d530c3.cccc6180@mail>, size 1399
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: Finished processing message
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 250 2.1.5 pftestuser@test.org Ok
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: > QUIT
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: < 221 2.0.0 Bye
      Jul  2 12:49:19 upv-agbk-kmx001 kopano-dagent[4188]: LMTP thread exiting
      Jul  2 12:49:19 upv-agbk-kmx001 postfix/lmtp[4187]: 1BC15106A461: to=<pftestuser@test.org>, relay=127.0.0.1[127.0.0.1]:2003, delay=0.28, delays=0.07/0.01/0.05/0.15, dsn=2.1.5, status=sent (250 2.1.5 pftestuser@test.org Ok)
      Jul  2 12:49:19 upv-agbk-kmx001 postfix/qmgr[3639]: 1BC15106A461: removed
      

      Packages:

      kopano-common-8.7.3.0-30.1.x86_64
      libvmime-kopano2-0.9.2.85-6.1.x86_64
      kopano-backup-8.7.3.0-30.1.x86_64
      kopano-monitor-8.7.3.0-30.1.x86_64
      z-push-backend-kopano-2.5.0+0-117.1.noarch
      libvmime-kopano1-0.9.2.50-12.6.x86_64
      kopano-webapp-lang-3.5.7.2338-95.1.noarch
      libgsoap-kopano-2_8_84-2.8.84-3.1.x86_64
      kopano-lang-8.7.3.0-30.1.x86_64
      kopano-utils-8.7.3.0-30.1.x86_64
      kopano-server-8.7.3.0-30.1.x86_64
      kopano-dagent-8.7.3.0-30.1.x86_64
      python2-kopano-8.7.3.0-30.1.x86_64
      kopano-search-8.7.3.0-30.1.x86_64
      kopano-contacts-8.7.3.0-30.1.x86_64
      kopano-ical-8.7.3.0-30.1.x86_64
      kopano-server-packages-8.7.3.0-30.1.x86_64
      kopano-client-8.7.3.0-30.1.x86_64
      kopano-dagent-pytils-8.7.3.0-30.1.x86_64
      kopano-spooler-8.7.3.0-30.1.x86_64
      kopano-python-utils-8.7.3.0-30.1.x86_64
      kopano-gateway-8.7.3.0-30.1.x86_64
      libgsoap-kopano-2_8_83-2.8.83-1.1.x86_64
      kopano-webapp-3.5.7.2338-95.1.noarch
      kopano-python3-extras-0.1.2+0-53.3.x86_64
      
      python-IPy-0.75-6.el7.noarch
      audit-libs-python-2.8.4-4.el7.x86_64
      python2-mapi-8.7.3.0-30.1.x86_64
      python-linux-procfs-0.4.9-4.el7.noarch
      libxml2-python-2.9.1-6.el7_2.3.x86_64
      python-backports-1.0-8.el7.x86_64
      python-configparser-3.5.0b2-1.el7.noarch
      python-urlgrabber-3.10-9.el7.noarch
      rh-python36-python-pip-9.0.1-2.el7.noarch
      rh-python36-2.0-1.el7.x86_64
      python-slip-dbus-0.4.0-4.el7.noarch
      python-decorator-3.4.0-3.el7.noarch
      libselinux-python-2.5-14.1.el7.x86_64
      python-schedutils-0.4-6.el7.x86_64
      python-configobj-4.7.2-7.el7.noarch
      python-kitchen-1.1.1-5.el7.noarch
      python-gobject-base-3.22.0-1.el7_4.1.x86_64
      python-2.7.5-80.el7_6.x86_64
      python-ipaddress-1.0.16-2.el7.noarch
      python-setuptools-0.9.8-7.el7.noarch
      python-pycurl-7.19.0-19.el7.x86_64
      rh-python36-runtime-2.0-1.el7.x86_64
      rh-python36-python-setuptools-36.5.0-1.el7.noarch
      rh-python36-python-3.6.3-3.el7.x86_64
      dbus-python-1.1.1-9.el7.x86_64
      python-firewall-0.5.3-5.el7.noarch
      libsemanage-python-2.5-14.el7.x86_64
      policycoreutils-python-2.5-29.el7_6.1.x86_64
      python2-kopano-8.7.3.0-30.1.x86_64
      rh-python36-python-virtualenv-15.1.0-2.el7.noarch
      python-xapian-1.2.21-1.7.x86_64
      python-dateutil-1.5-7.el7.noarch
      kopano-python-utils-8.7.3.0-30.1.x86_64
      python-slip-0.4.0-4.el7.noarch
      newt-python-0.52.15-4.el7.x86_64
      python-iniparse-0.4-9.el7.noarch
      python-chardet-2.2.1-1.el7_1.noarch
      python-libs-2.7.5-80.el7_6.x86_64
      python-perf-3.10.0-957.21.3.el7.x86_64
      python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
      rh-python36-python-libs-3.6.3-3.el7.x86_64
      rh-python36-python-devel-3.6.3-3.el7.x86_64
      kopano-python3-extras-0.1.2+0-53.3.x86_64
      python-pyudev-0.15-9.el7.noarch
      rpm-python-4.11.3-35.el7.x86_64
      

      I’m also not sure on how to Setup Python 3 (Python 2 compatibility will be removed in the future), since permanently replacing system default version 2.7.5 with 3.x will break yum (and possibly others).

      Any hint and advise helping to resolve my issues would be highly appreciated. Many thanks.

      Best regards,

      Cusard

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