python import kopano error Centos-7

hi,
i’m trying to write some pyhton helpers, but get stuck @ importing kopano …
any hints?

[root@Bowmore ~]# python
Python 2.7.5 (default, Apr 11 2018, 07:36:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import kopano
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/kopano/__init__.py", line 54, in <module>
    from .config import Config, CONFIG
  File "/usr/lib/python2.7/site-packages/kopano/config.py", line 17, in <module>
    import utils as _utils
  File "/usr/lib/python2.7/site-packages/kopano/utils.py", line 40, in <module>
    import user as _user
  File "/usr/lib/python2.7/site-packages/kopano/user.py", line 26, in <module>
    from .store import Store
  File "/usr/lib/python2.7/site-packages/kopano/store.py", line 62, in <module>
    from . import notification as _notification
  File "/usr/lib/python2.7/site-packages/kopano/notification.py", line 33, in <module>
    import folder as _folder
  File "/usr/lib/python2.7/site-packages/kopano/folder.py", line 94, in <module>
    import item as _item
  File "/usr/lib/python2.7/site-packages/kopano/item.py", line 24, in <module>
    import inetmapi
  File "/usr/lib/python2.7/site-packages/inetmapi.py", line 26, in <module>
    _inetmapi = swig_import_helper()
  File "/usr/lib/python2.7/site-packages/inetmapi.py", line 18, in swig_import_helper
    import _inetmapi
ImportError: /lib64/libkcinetmapi.so.0: undefined symbol: _ZSt24__throw_out_of_range_fmtPKcz
>>>

Kopano-python is installed 8.6:

 yum list |grep kopano
kopano-client.x86_64                        8.6.2.1-5.1           @Kopano-Core
kopano-common.x86_64                        8.6.2.1-5.1           @Kopano-Core
kopano-contacts.x86_64                      8.6.2.1-5.1           @Kopano-Core
kopano-lang.x86_64                          8.6.2.1-5.1           @Kopano-Core
kopano-webapp.noarch                        3.4.10.1344-56.1      @Kopano-webapp
kopano-webapp-lang.noarch                   3.4.10.1344-56.1      @Kopano-webapp
kopano-webapp-plugin-files.noarch           2.1.0.147-23.1        @Kopano-Files
kopano-webapp-plugin-filesbackend-owncloud.noarch
kopano-webapp-plugin-filesbackend-smb.noarch
kopano-webapp-plugin-intranet.noarch        0.1-7.5               @Kopano-webapp
libgsoap-kopano-2_8_54.x86_64               2.8.54-1.1            @Kopano-Core
libgsoap-kopano-2_8_62.x86_64               2.8.62-1.1            @Kopano-Core
libvmime-kopano1.x86_64                     0.9.2-12.2            @Kopano-Core
python2-kopano.x86_64                       8.6.2.1-5.1           @Kopano-Core
gsoap-kopano-debuginfo.x86_64               2.8.62-1.1            Kopano-Core
gsoap-kopano-devel.x86_64                   2.8.62-1.1            Kopano-Core
gsoap-kopano-doc.noarch                     2.8.62-1.1            Kopano-Core
kopano-backup.x86_64                        8.6.2.1-5.1           Kopano-Core
kopano-bash-completion.noarch               8.6.2.1-5.1           Kopano-Core
kopano-dagent.x86_64                        8.6.2.1-5.1           Kopano-Core
kopano-debuginfo.x86_64                     8.6.2.1-5.1           Kopano-Core
kopano-devel.x86_64                         8.6.2.1-5.1           Kopano-Core
kopano-gateway.x86_64                       8.6.2.1-5.1           Kopano-Core
kopano-ical.x86_64                          8.6.2.1-5.1           Kopano-Core
kopano-migration-imap.noarch                8.6.2.1-5.1           Kopano-Core
kopano-migration-pst.x86_64                 8.6.2.1-5.1           Kopano-Core
kopano-monitor.x86_64                       8.6.2.1-5.1           Kopano-Core
kopano-presence.x86_64                      8.6.2.1-5.1           Kopano-Core
kopano-search.x86_64                        8.6.2.1-5.1           Kopano-Core
kopano-server.x86_64                        8.6.2.1-5.1           Kopano-Core
kopano-server-packages.x86_64               8.6.2.1-5.1           Kopano-Core
kopano-spamd.x86_64                         8.6.2.1-5.1           Kopano-Core
kopano-spooler.x86_64                       8.6.2.1-5.1           Kopano-Core
kopano-utils.x86_64                         8.6.2.1-5.1           Kopano-Core
libvmime-kopano1.x86_64                     0.9.2-14.2            Kopano-Core
libvmime_kopano-debuginfo.x86_64            0.9.2-14.2            Kopano-Core

it works for me:

root@felix-centos-7-final ~
$ python
Python 2.7.5 (default, Apr 11 2018, 07:36:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import kopano
>>>

Hello @segro,

please check your version of “libstdc++”-Package. - I remember similar errors posted on gitlab a while ago.
The cause was a version mismatch of “libstdc++” and “libgcc”/“gcc”

coffee_is_life

Hi @segro ,

How did you solve it? I’ve the same error and my versions of libstdc++, libgcc and gcc are the same (4.8.5-28.el7_5.1 ).
This error has appeared when I migrate KC from 8.4.5 to 8.6.7 using the standard procedure (yum update kopano*)

kind regards

It has been solved by the Kopano support due a error on a dependency that doesn’t was updated successfully.
Run the command “yum update libmime-kopano” has solved the problem