ics.py AttributeError: 'NoneType' object has no attribute 'Value'
-
Hi,
I’m using the debian buster packages (after an upgrade von zarafa) and get the following error in kopano-search / kopano-spamd logs. As far as I can say, something with a message seems to be wrong.
Is there a way to find out what and which message causes the problem? Perhaps I can delete the message.
kopano-fsck showed no error.
Thank you for your help!
SOLVED by @genesis74 : use https://kb.kopano.io/display/WIKI/MySQL+data+recovery to repair the tproperties table
kopano-search:
2019-09-09 10:04:48,954 - search - ERROR - Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/ics.py", line 118, in ImportMessageChange store_entryid = PpropFindProp(props, PR_STORE_ENTRYID).Value AttributeError: 'NoneType' object has no attribute 'Value' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/log.py", line 103, in log_exc try: yield File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 393, in incremental_sync new_state = self.server.sync(importer, self.state, log=self.log) File "/usr/lib/python3/dist-packages/kopano/server.py", line 806, in sync return _ics.sync(self, self.mapistore, importer, state, max_changes, window=window, begin=begin, end=end, stats=stats) File "/usr/lib/python3/dist-packages/kopano/ics.py", line 272, in sync (steps, step) = exporter.Synchronize(step) File "/usr/lib/python3/dist-packages/MAPICore.py", line 1906, in Synchronize return _MAPICore.IExchangeExportChanges_Synchronize(self, INOUT) File "/usr/lib/python3/dist-packages/kopano/ics.py", line 134, in ImportMessageChange self.log.error('could not process change for entryid %s (%r):', _benc(entryid.Value), props) AttributeError: 'NoneType' object has no attribute 'Value'
kopano-spamd
2019-09-09 10:02:13,939 - spamd - ERROR - could not process change for entryid None ([SPropValue(0x65E00102, b'\x9e\x82\x04r\x9bIA\xe9\x8f\x0fm\x10C5\xef\xbc\x00\xa3\x02\x00\x00\x00'), SPropValue(0x65E10102, b'\x9e\x82\x04r\x9bIA\xe9\x8f\x0fm\x10C5\xef\xbc\xdc\x1c\x00\x00\x00\x00')]): 2019-09-09 10:02:13,939 - spamd - ERROR - Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/ics.py", line 121, in ImportMessageChange item = _item.Item() AttributeError: 'NoneType' object has no attribute 'Value'
Debian packages:
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-===========================-=============-============-======================================================= ii kopano-backup 8.7.0-3 all Complete and feature rich groupware solution - backup un kopano-client <none> <none> (no description available) ii kopano-common 8.7.0-3 all Complete and feature rich groupware solution - common f ii kopano-contacts:amd64 8.7.0-3 amd64 Complete and feature rich groupware solution - contact ii kopano-core 8.7.0-3 all Metapackage to install the Kopano Core stack ii kopano-dagent 8.7.0-3 amd64 Complete and feature rich groupware solution - delivery ii kopano-gateway 8.7.0-3 amd64 Complete and feature rich groupware solution - POP3 and ii kopano-ical 8.7.0-3 amd64 Complete and feature rich groupware solution - CalDAV a ii kopano-libs:amd64 8.7.0-3 amd64 Complete and feature rich groupware solution - Free/Bus ii kopano-monitor 8.7.0-3 amd64 Complete and feature rich groupware solution - quota mo ii kopano-search 8.7.0-3 all Complete and feature rich groupware solution - indexer ii kopano-server 8.7.0-3 amd64 Complete and feature rich groupware solution - server c ii kopano-spamd 8.7.0-3 all Complete and feature rich groupware solution - Spam dae ii kopano-spooler 8.7.0-3 amd64 Complete and feature rich groupware solution - email sp ii kopano-utils 8.7.0-3 amd64 Complete and feature rich groupware solution - admin to un kopano-webapp <none> <none> (no description available) ii kopano-webapp-apache2 3.5.2+dfsg1-1 all WebApp for the Kopano Collaboration Platform - Apache2 ii kopano-webapp-common 3.5.2+dfsg1-1 all WebApp for the Kopano Collaboration Platform - common f ii kopano-webapp-folderwidgets 3.5.2+dfsg1-1 all Kopano WebApp folder widgets plugin un kopano-webapp-lighttpd <none> <none> (no description available) un kopano-webapp-nginx <none> <none> (no description available)
-
Anyone any idea how to investigate this problem?
Here my /etc/kopano/search.cfg:
log_method = file log_level = 6 log_file = /var/log/kopano/search.log log_timestamp = yes index_attachments = yes index_attachment_max_size = 5M
-
Can confirm same error with versions
- 8.7.82.88
- 8.7.83.94.c8e3587
Both on Debian 10.
-
Hi @hugo21212,
as you are using the Debian packaging of Kopano I would recommend posting on the Debian mailinglist. Seems some dependencies are missing.
-
Hi @fbartels,
thank you. If I would know which dependencies, I could try to find them. But the log files don’t help in this regard, which makes the analysis difficult.
Do you have an idea what may be missing?
PpropFindProp(props, PR_STORE_ENTRYID) does not return anything (or at least None - but I’m not a python programmer). So the question is, what is causing it. If a dependency would be missing, I would expect an error, that python is missing a library, not that PpropFindProp (ingenious naming! :-)) doesn’t return anything.
As I wrote: if it is message dependend, I could just delete the message or check what is not right with it.
Thank you for your help!
-
Hi @hugo21212,
I had quite similar (not identical) error messages in my search.log.
2019-10-11 20:28:59,884 - search - ERROR - Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/ics.py", line 130, in ImportMessageChange self.importer.update(item, flags) File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 312, in update self.queue((0, item.storeid, item.folder.entryid)) AttributeError: 'NoneType' object has no attribute 'entryid'
In my case it turned out to be a database problem. I identified truncated entries in the tproperties table.
After thoroughly backing up the database I followed these steps in the Kopano Wiki to rebuild the tproperties table. At first glance this was successful. At least a full rebuild of the search index went through without a single error message in the log.
-
Hi @genesis74,
thank you very much for your help! It indeed helped!
-
I´m having the same issues with the nigthlies:
kopano-search 8.7.85.51.2bf02c781-0+193.1Nov 25 07:42:51 nas2 kopano-search[32965]: 2019-11-25 07:42:51,861 - search - ERROR - Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/ics.py", line 119, in ImportMessageChange store_entryid = PpropFindProp(props, PR_STORE_ENTRYID).Value AttributeError: 'NoneType' object has no attribute 'Value' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kopano/log.py", line 102, in log_exc try: yield File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 362, in incremental_sync new_state = self.server.sync(importer, self.state, log=self.log) File "/usr/lib/python3/dist-packages/kopano/server.py", line 1049, in sync window=window, begin=begin, end=end, stats=stats) File "/usr/lib/python3/dist-packages/kopano/ics.py", line 316, in sync (steps, step) = exporter.Synchronize(step) File "/usr/lib/python3/dist-packages/MAPICore.py", line 1899, in Synchronize return _MAPICore.IExchangeExportChanges_Synchronize(self, INOUT) File "/usr/lib/python3/dist-packages/kopano/ics.py", line 142, in ImportMessageChange _benc(entryid.Value), props) AttributeError: 'NoneType' object has no attribute 'Value'
I did the tproperties rebuild as suggested above, but this doesn´t cure the issue for me.
-
It seems that I only get the issue when I´ve set
enable_enhanced_ics = no in server.cfg