I upgraded my app to Py3 two days ago, and today I received the following error:
2020-07-27 07:40:49,668 - [ERROR] - Traceback (most recent call last): File "/srv/bliss/deployment/work/source/bliss.git/src/Products/BlissSupportMailer/BlissSupportMailer.py", line 212, in _import_support_message parser_response = support_email.parseFromString(message_data) File "/srv/bliss/deployment/work/source/bliss.git/src/Products/BlissSupport/SupportEmail.py", line 447, in parseFromString parent_message = self._connect_to_parent_message(message) File "/srv/bliss/deployment/work/source/bliss.git/src/Products/BlissSupport/SupportEmail.py", line 117, in _connect_to_parent_message results = mm.subClassCatalog('AbstractSupportEmail').searchResults(msgId=in_reply_to_message_id) File "/srv/bliss/deployment/work/source/bliss.git/src/Products/SubClassCatalog/SubClassCatalog.py", line 83, in searchResults results.extend(catalog.searchResults(query)) File "/srv/bliss/.batou-shared-eggs/Products.ZCatalog-5.0.4-py3.7.egg/Products/ZCatalog/ZCatalog.py", line 611, in searchResults return self._catalog.searchResults(query, **kw) File "/srv/bliss/.batou-shared-eggs/Products.ZCatalog-5.0.4-py3.7.egg/Products/ZCatalog/Catalog.py", line 1091, in searchResults return self.search(query, sort_indexes, reverse, sort_limit, _merge) File "/srv/bliss/.batou-shared-eggs/Products.ZCatalog-5.0.4-py3.7.egg/Products/ZCatalog/Catalog.py", line 634, in search rs = self._search_index(cr, index_id, query, rs) File "/srv/bliss/.batou-shared-eggs/Products.ZCatalog-5.0.4-py3.7.egg/Products/ZCatalog/Catalog.py", line 564, in _search_index index_rs = index.query_index(index_query, rs) File "/srv/bliss/.batou-shared-eggs/Products.ZCatalog-5.0.4-py3.7.egg/Products/ZCTextIndex/ZCTextIndex.py", line 210, in query_index results = tree.executeQuery(self.index) File "/srv/bliss/.batou-shared-eggs/Products.ZCatalog-5.0.4-py3.7.egg/Products/ZCTextIndex/ParseTree.py", line 132, in executeQuery return index.search_phrase(self.getValue()) File "/srv/bliss/.batou-shared-eggs/Products.ZCatalog-5.0.4-py3.7.egg/Products/ZCTextIndex/BaseIndex.py", line 217, in search_phrase if docwords.find(code) >= 0: TypeError: argument should be integer or bytes-like object, not 'str' (server time: 20200727T07:40:49)
Luckily, there is some hint in the Zope documentation:
If your application uses the ZCatalog and there are problems with any of them, do a clear and rebuild.
And actually, this solved my problem.
I am just curious - as I have hundreds of indexes.
Why was this one affected? What about my other indexes? Re-building all of them would take a lot of time.
Any hint why this was was broken?
The indexed information is the
In-Reply-To value of an email message object.