← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #678460]: [1.1.4 PyJnius] Fix ' TypeError: 'float' object is not callable '

 

Question #678460 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678460

Description changed to:
Found a Solution for the '# pat.similar(1.0) # Throw an Error:
TypeError: 'float' object is not callable':

In 'C:\Users\DOP\AppData\Local\Programs\Python\Python37\Lib\site-
packages\jnius\reflect.py' change ( Line 188 with pyjnius Version 1.2.0:

 
        if name != 'getClass' and bean_getter(name) and len(method.getParameterTypes()) == 0:
            lowername = lower_name(name[2 if name.startswith('is') else 3:])
            classDict[lowername] = (lambda n: property(lambda self: getattr(self, n)()))(name)
        continue
 
to:

 
        if name != 'getClass' and bean_getter(name) and len(method.getParameterTypes()) == 0:
            lowername = lower_name(name[2 if name.startswith('is') else 3:])
            if lowername not in methods_name:
             classDict[lowername] = (lambda n: property(lambda self: getattr(self, n)()))(name)
        continue

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.