dedupe icon indicating copy to clipboard operation
dedupe copied to clipboard

_format_search_results Assertion Error

Open monicatao opened this issue 6 years ago • 4 comments

Hi, is there a reason why you added "assert a is not None" in the _format_search_results function in latest release. Because now I always get assertion error while running gazette model. Please advise. Thank you!

monicatao avatar Aug 17 '20 11:08 monicatao

i added it to take advantage of static typing, but indeed a should never be None. Can you prepare a reproducible example?

fgregg avatar Aug 24 '20 15:08 fgregg

Did you manage to solve this issue? The same is happening to me (Sorry for creating a duplicate in #850 )

felixpoege avatar Sep 01 '20 17:09 felixpoege

@felixpoege can you post a reproducible example

fgregg avatar Sep 01 '20 17:09 fgregg

Would be super annoying to extract that dedupe component out of a large workflow, isn't there any pointer what to search for? I varied the set of messy records (small random subset of the full one) and the the error occurs every time. I changed the code of api.py to print a before asserting, the result is [ ]. Same for result. In another dedupe component, which then is a Dedupe type (not Gazetteer as this one) runs flawlessly.

For now, I changed the api.py code so that if a is None, the yield and seen.add(a) part is skipped - that seemed to work for now.

felixpoege avatar Sep 01 '20 19:09 felixpoege