Error while running fuzzywuzzy/fuzz.py

3.1k views Asked by At

I have a program that uses fuzzywuzzy to match to csvs and find any strings that might be duplicates or very similar. When I compare my two files, fuzzywuzzy raises the following error:

WARNING:root:Applied processor reduces input query to empty string all comparisons will have score 0. [Query:'+']

Anyone have any idea what cause that error to come up?

1

There are 1 answers

3
Monozygotic On BEST ANSWER

The error comes from process.extractOne().

Fuzzywuzzy does some cleaning of the queries you give it, including case folding and replacing non-letters and non-numbers with white space.

Your query only contains a plus sign, which is replaced by white space, leaving an empty string, which cannot be fuzzy matched against. That causes the error.