0

Everything I've read about this problem revolves around check_availability() = FALSE. However, mine is TRUE, but I'm still getting the "attempt to apply non-function" error. Here's the code I'm trying to run:

reticulate::py_config()
library(fuzzywuzzyR)

check_availability()

init <- FuzzMatcher$new()
init$Partial_token_set_ratio(string1 = "Clare", string2 = "Claire", force_ascii = TRUE, full_process = TRUE)

And the output:

[1] TRUE

Error in init$Partial_token_set_ratio(string1 = "Clare", string2 = "Claire", : attempt to apply non-function

Am I doing something wrong? Or is there a fix for this?

I've found articles such as:

https://github.com/mlampros/fuzzywuzzyR/issues/1

FuzzywuzzyR error attempt to apply non-function

https://community.rstudio.com/t/r-fuzzy-wuzzy-error-message-attempt-to-apply-non-function/72512

They either don't apply to my problem exactly, or I don't understand them.

parrotox
  • 1
  • 3
  • Could you share what you've read? You're referring to a possible solution but I don't know what that is – camille Dec 23 '21 at 19:25
  • @camille thanks, I added a few links. – parrotox Dec 23 '21 at 22:38
  • @parrotox, for fuzzywuzzyR to work you need a functional Python configuration that includes the 'Levenshtein' and 'difflib' Python packages. Did you try reticulate::py_discover_config(required_module = 'Levenshtein') from within Rstudio? The issue https://github.com/mlampros/fuzzywuzzyR/issues/1 mentions various issues / cases. It would be better that you continue by adding information on that issue on Github where you might find a solution for your Operating System, Python version and R version – lampros Dec 29 '21 at 07:09

0 Answers0