← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #232707]: Unable to import module & call method

 

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

Description changed to:
New to both Sikuli & Python. Any help here would be appreciated.


After importing a module(mod a) to my main script (mod b) , the sikuli compiler gives me a error: [error] TypeError ( login() takes exactly 3 arguments (4 given) )

mod a:

from sikuli import *

class Chrome:

    ######### Variables ########
    flexClient = r"https://12344/vsphere-client/#"; + Key.ENTER
    username = "hello" + Key.ENTER
    pwd = "hello" + Key.ENTER
    ############################

    def login(self, flexClient, username, pwd):
                 do some stuff & log in to Chrome
                  return 0


mod b:
import chromeLogin
from chromeLogin import *

chromeObj = Chrome()

chromeObj.login(Chrome.flexClient, Chrome.username, Chrome.pwd)

     
Any suggestions on why the method is defined with 3 parameters, called with 3 parameters, but sikuli is saying something is wrong?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.