'Fuzzywuzzy returns 'ratio' not defined in Pycharm only

Why might I be getting a 'NameError: name 'ratio' is not defined' error when I attempt to use fuzzywuzzy in Pycharm. I have no issues using it in IDLE or python's 32-bit app.

I've reviewed similar topics of "works in idle but not pycharm"; however, those found related only to import name typos, utf encoding, and same function/file name. And I have ruled those out.

Example: Using: Python 3.7, Windows 10, FuzzyWuzzy version: 0.17

In IDLE -

    >>> from fuzzywuzzy import fuzz
    >>> fuzz.ratio('test', 'test2')
    >>> 89

In PYCHARM's python console:

    from fuzzywuzzy import fuzz
    fuzz.ratio('test', 'test2')

RETURNS:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Users\xx188\AppData\Local\Programs\Python\Python37-32\lib\site-packages\fuzzywuzzy\utils.py", line 38, in decorator
    return func(*args, **kwargs)
  File "C:\Users\xx188\AppData\Local\Programs\Python\Python37-32\lib\site-packages\fuzzywuzzy\utils.py", line 29, in decorator
    return func(*args, **kwargs)
  File "C:\Users\xx188\AppData\Local\Programs\Python\Python37-32\lib\site-packages\fuzzywuzzy\utils.py", line 47, in decorator
    return func(*args, **kwargs)
  File "C:\Users\xx188\AppData\Local\Programs\Python\Python37-32\lib\site-packages\fuzzywuzzy\fuzz.py", line 28, in ratio
    return utils.intr(100 * m.ratio())
  File "C:\Users\xx188\AppData\Local\Programs\Python\Python37-32\lib\site-packages\fuzzywuzzy\StringMatcher.py", line 64, in ratio
    self._ratio = ratio(self._str1, self._str2)
NameError: name 'ratio' is not defined


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source