Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError: The method ('apply', ('Ljava/lang/Object;', ('Ljava/lang/Object;',))) is not implemented #599

Closed
paliwalg opened this issue Jul 27, 2021 · 1 comment
Labels

Comments

@paliwalg
Copy link

paliwalg commented Jul 27, 2021

Facing this error

===== Python/java method missing ======
Python class:<hederaDid.generated.PyFunction object at 0x7fb5258aab40>
Java method name:apply
Signature: (Ljava/lang/Object;)Ljava/lang/Object;

Traceback (most recent call last):
File "jnius/jnius_proxy.pxi", line 50, in jnius.PythonJavaClass.invoke
File "jnius/jnius_proxy.pxi", line 74, in jnius.PythonJavaClass._invoke
NotImplementedError: The method ('apply', ('Ljava/lang/Object;', ('Ljava/lang/Object;',))) is not implemented

PyFunction class is defined as :

class PyFunction(PythonJavaClass):
    __javainterfaces__ = ['java/util/function/Function']
    def __init__(self, fn):
        self.fn = fn
    @java_method('(Ljava/lang/Object;)Ljava/lang/Object;')
    def apply(self, tx):
        return self.fn(tx)

Can you please advise what's missing here ?

@github-actions
Copy link

👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants