← Back to team overview

sikuli-driver team mailing list archive

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

 

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

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.