No keyword with name 'RE.invoke_reg1' found

I’m calling python file and one of its method from robot file

*** Settings ***
Library ${CURDIR}/…/…/…/Resources/Keywords/CommonClasses/Registration.py WITH NAME RE

*** Test Cases ***
user_reg_user
RE.invoke_reg1 ${BASE_URL}

Python file named as Registration.py
class Registration():
def invoke_reg1(self, host):
print (“hii”)

why I’m getting this error ? all the naming conventions are correct

Hi Sanchana,

Which version of robot framework are you using?

Can you re-post this using a code block, (three back ticks (```) before and after the code) so that we can see the white space you’ve used?

I can’t see any issue with what you’ve posted unless there is missing white space?

I’ll note the Robot Framework User Guide for Setting custom name to library does mention that the WITH NAME was deprecated in version 6.0, so if you are using version 6.1 perhaps that might be the issue?

Dave.