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

artiq_rpctool does not cope with kwonlyargs #1029

Closed
jordens opened this issue May 31, 2018 · 2 comments
Closed

artiq_rpctool does not cope with kwonlyargs #1029

jordens opened this issue May 31, 2018 · 2 comments
Assignees
Milestone

Comments

@jordens
Copy link
Member

jordens commented May 31, 2018

This is artiq_rpctool ... list-methods on the newfocus8742 controller.

Traceback (most recent call last):
  File "/home/rj/src/conda/envs/py35/bin/artiq_rpctool", line 11, in <module>
    load_entry_point('artiq', 'console_scripts', 'artiq_rpctool')()
  File "/home/rj/src/artiq/artiq/frontend/artiq_rpctool.py", line 138, in main
    list_methods(remote)
  File "/home/rj/src/artiq/artiq/frontend/artiq_rpctool.py", line 69, in list_methods
    if kwonlyarg in argspec["kwonlydefaults"]:
TypeError: argument of type 'NoneType' is not iterable

The signature is: f(self, xx=None, *nn)

argspec is: {'varargs': 'nn', 'kwonlydefaults': None, 'varkw': None, 'defaults': None, 'args': ['self'], 'annotations': {}, 'kwonlyargs': ['xx']}

@jordens jordens added this to the 3.7 milestone May 31, 2018
@whitequark whitequark self-assigned this May 31, 2018
@whitequark
Copy link
Contributor

No, the signature is: do_dh(self, *nn, xx). You have the wrong method, f is fine.

@jordens
Copy link
Member Author

jordens commented Jun 1, 2018

Right! Sorry for the red herring.

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

No branches or pull requests

2 participants