{"action":"created","issue":{"url":"https://api.github.com/repos/NSLS-II/ophyd/issues/110","labels_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/110/comments","events_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/110/events","html_url":"https://github.com/NSLS-II/ophyd/issues/110","id":67442437,"number":110,"title":"bug in dscan","user":{"login":"ericdill","id":6223243,"avatar_url":"https://avatars.githubusercontent.com/u/6223243?v=3","gravatar_id":"","url":"https://api.github.com/users/ericdill","html_url":"https://github.com/ericdill","followers_url":"https://api.github.com/users/ericdill/followers","following_url":"https://api.github.com/users/ericdill/following{/other_user}","gists_url":"https://api.github.com/users/ericdill/gists{/gist_id}","starred_url":"https://api.github.com/users/ericdill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericdill/subscriptions","organizations_url":"https://api.github.com/users/ericdill/orgs","repos_url":"https://api.github.com/users/ericdill/repos","events_url":"https://api.github.com/users/ericdill/events{/privacy}","received_events_url":"https://api.github.com/users/ericdill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-09T20:18:06Z","updated_at":"2015-04-10T00:51:21Z","closed_at":null,"body":"```\r\nOphyd [32]: dscan(slt_ssa_ib, -.1, .1, 1, m3_xu_pos=m3_xu.get()[0])\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-32-1b957d6b3727> in <module>()\r\n----> 1 dscan(slt_ssa_ib, -.1, .1, 1, m3_xu_pos=m3_xu.get()[0])\r\n\r\n/nfs/xf05id1/mc/envs/ophyd_ng/lib/python2.7/site-packages/ophyd-0.0.7rc1-py2.7.egg/ophyd/userapi/scan_api.pyc in __call__(self, positioners, start, stop, npts, **kwargs)\r\n    429             The number of intervals in the scan\r\n    430         \"\"\"\r\n--> 431         self.setup_scan(positioners, start, stop, npts, **kwargs)\r\n    432         self.run(**kwargs)\r\n    433 \r\n\r\n/nfs/xf05id1/mc/envs/ophyd_ng/lib/python2.7/site-packages/ophyd-0.0.7rc1-py2.7.egg/ophyd/userapi/scan_api.pyc in setup_scan(self, *args, **kwargs)\r\n    505         current position and the scan range.\r\n    506         \"\"\"\r\n--> 507         super(DScan, self).setup_scan(*args, **kwargs)\r\n    508         self._start_positions = [p.position for p in self.positioners]\r\n    509         self.paths = [np.array(path) + start\r\n\r\n/nfs/xf05id1/mc/envs/ophyd_ng/lib/python2.7/site-packages/ophyd-0.0.7rc1-py2.7.egg/ophyd/userapi/scan_api.pyc in setup_scan(self, positioners, start, stop, npts, **kwargs)\r\n    464 \r\n    465         args = (positioners, start, stop, npts)\r\n--> 466         self.scan_command = self._format_command_line(*args, **kwargs)\r\n    467 \r\n    468         # Calculate number of points from intervals\r\n\r\n/nfs/xf05id1/mc/envs/ophyd_ng/lib/python2.7/site-packages/ophyd-0.0.7rc1-py2.7.egg/ophyd/userapi/scan_api.pyc in _format_command_line(self, *args, **kwargs)\r\n    409     def _format_command_line(self, *args, **kwargs):\r\n    410         \"\"\"Return a string representation of the passed arguments\"\"\"\r\n--> 411         cl_args = cmdline_to_str(*args, **kwargs)\r\n    412         rtn = '{}()({})'.format(self.__class__.__name__, cl_args)\r\n    413         return rtn\r\n\r\n/nfs/xf05id1/mc/envs/ophyd_ng/lib/python2.7/site-packages/ophyd-0.0.7rc1-py2.7.egg/ophyd/userapi/scan_api.pyc in cmdline_to_str(*args, **kwargs)\r\n    650         msg.append(', ')\r\n    651         for key, value in kwargs.iteritems():\r\n--> 652             msg.append('{}={}'.format(key, objects_to_str(value)))\r\n    653 \r\n    654     return ''.join(msg)\r\n\r\n/nfs/xf05id1/mc/envs/ophyd_ng/lib/python2.7/site-packages/ophyd-0.0.7rc1-py2.7.egg/ophyd/userapi/scan_api.pyc in objects_to_str(iterables, iter_sep, iter_start, iter_stop)\r\n    617         pass\r\n    618 \r\n--> 619     for i in iterables:\r\n    620         # Is the object i iterable:\r\n    621         if isinstance(i, tuple):\r\n\r\nTypeError: 'float' object is not iterable\r\n```\r\n\r\nNote that:\r\n```\r\nOphyd [34]: m3_xu.value\r\n   Out[34]: [1.9106729999999998, 1.912, 'mm', 0, 1, 0]\r\n```"},"comment":{"url":"https://api.github.com/repos/NSLS-II/ophyd/issues/comments/91390999","html_url":"https://github.com/NSLS-II/ophyd/issues/110#issuecomment-91390999","issue_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/110","id":91390999,"user":{"login":"stuwilkins","id":1297941,"avatar_url":"https://avatars.githubusercontent.com/u/1297941?v=3","gravatar_id":"","url":"https://api.github.com/users/stuwilkins","html_url":"https://github.com/stuwilkins","followers_url":"https://api.github.com/users/stuwilkins/followers","following_url":"https://api.github.com/users/stuwilkins/following{/other_user}","gists_url":"https://api.github.com/users/stuwilkins/gists{/gist_id}","starred_url":"https://api.github.com/users/stuwilkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuwilkins/subscriptions","organizations_url":"https://api.github.com/users/stuwilkins/orgs","repos_url":"https://api.github.com/users/stuwilkins/repos","events_url":"https://api.github.com/users/stuwilkins/events{/privacy}","received_events_url":"https://api.github.com/users/stuwilkins/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T00:51:21Z","updated_at":"2015-04-10T00:51:21Z","body":"for a start should you not be using `m3_xu.position` if it is a motor? That should return a float not the list. \r\nSecondly, this is trying to make a string representation of the scan command as requested. It appears that when the kwargs were made freeform there are some pathological cases where this breaks. \r\n\r\nPlease check with `m3_xu.position` and also m3_xu_pos=[m3_xu.position]\r\n\r\n\r\n"}}