Skip to content

'IFBucket' object has no attribute 'byValue' when running with PURE_PYTHON #187

@justincinmd

Description

@justincinmd

The dedupe package uses BTree, and raises the following exception when running under pypy 3.8 or python 3.10 with the PURE_PYTHON environment variable set to 1.

  File "/etc/build/venvs/default/lib/python3.10/site-packages/dedupe/tfidf.py", line 39, in search
    center for score, center in self._index.apply(query_list, threshold)
  File "/etc/build/venvs/default/lib/python3.10/site-packages/dedupe/canopy_index.py", line 76, in apply
    filtered_results: list[tuple[float, int]] = results.byValue(qw * threshold)
  File "/etc/build/venvs/default/lib/python3.10/site-packages/persistent/persistence.py", line 292, in __getattribute__
    return oga(self, name)
AttributeError: 'IFBucket' object has no attribute 'byValue'

The byValue method is missing when the results object is inspected in a debugger. In python 3.10 with the C extensions, byValue works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions