control icon indicating copy to clipboard operation
control copied to clipboard

TypeError: __init__() takes at least 3 arguments (1 given)

Open tony1994513 opened this issue 7 years ago • 1 comments

Mr.studywolf, I am a master student and right now my direction is related to DMP, and the code you wrote is so nice. But when I tried to run "python run.py arm3 dmp write ", I got this error"TypeError: __init__() takes at least 3 arguments (1 given)" I followed the procedure as you said in the wiki. And I tried to debug this code, In this interface

control_shell, runner_pars = task(
    arm, controller_class,
    sequence=args['--sequence'], scale=args['--scale'],
    force=float(args['--force']) if args['--force'] is not None else None,
    write_to_file=bool(args['--write_to_file']))

I got the error and get inside, in here

control_shell = controller_class.Shell(controller=controller,

                                       **control_pars)

and get inside

super(Shell, self).__init__( **kwargs)

I once tried to manully add the parametes like gain, tau, trajectory, but it does not work. I am sorry that my logical maybe seems bad, I really appreciate if you can have a look!

tony1994513 avatar Sep 12 '17 02:09 tony1994513

hmmmmm! Thanks for bringing this up!

I'm having trouble replicating this error (tested in both python 2.7 and 3.5), my guess is that you might be using the pip installed pydmps library? There were a few changes since the pip release, could you confirm if you're using the latest install from https://github.com/studywolf/pydmps ? (installed with python setup.py develop from the root folder, once cloned)

studywolf avatar Sep 12 '17 13:09 studywolf