Closed szakitibi closed 6 years ago
After further testing and debugging it seems to relate to https://github.com/plonegovbr/brasil.gov.portal/issues/288. On PloneGov-BR they have encountered same traceback which they were able to fix with updating their indexer method to return utf8 encoded strings.
During our tests a pattern emerged, how we can reproduce the error from scratch and seemed like:
Also following up on the failing entry of Products.PluginIndexes.comon.UnIndex.insertForwardIndexEntry
method, we figured that plone.indexer.wrapper.IndexableObjectWrapper
returned our custom indexer method.
Although we still don't have all the answers:
Applying the same fix as https://github.com/plonegovbr/brasil.gov.agenda/pull/73/commits/912e44c8a73c623fc64ffdf826a47560d3675b4b on our indexer method (plone.dexterity.utils.safe_utf8
value before return) seems to prevent the issue.
BUG REPORT
First I want to apologize to report it here, but I could not create an issue on plone.app.referenceablebehavior repository, and contributing.rst then Guidelines for Contributing to Plone guided me here.
What I did:
We have some add-on packages using
plone.app.referenceablebehavior.referenceable.IReferenceable
so our Dexterity content types can be referenced by old 3rd party Archetype content types.What actually happened:
When I add any Dexterity content type with enabled IReferenceable behaviour using the lower letter start then some non ASCII characters (e.g: lowerNonÄscii) pattern in it's title, I get:
Did a bit of debugging and the failing line contains
self._index.get(entry, _marker)
, whereself._index
is aBTrees.OOBTree.OOBtree
object, while theentry
is the title<type 'str'> lowerNon\xc3\x84scii
.Error is not there if I use upper starting letter with non Ascii characters, e.g: UpperNonÄscii. Also spaces do not affect thing only the starting letter, so non Äscii gets the error while Non Äscii not.
Our packages are not involved in the error, since a dummy Dexterity type created through the web with enabled
plone.app.referenceablebehavior,reference.IReferenceable
behaviour fails, while without it there is no error.What version of Plone/ Addons I am using:
We used them on a Debian GNU/Linux 9.3 demo server, with:
And involved packages had versions:
Since C seems to be involved with BTree objects, I checked it with
ldd --version
, says:What I expect to happen:
No UnicodeDecodeError raised.
Which actually happened when I tried to reproduce the error locally on Ubuntu 14.04, with:
packages:
and C: