{"action":"created","issue":{"url":"https://api.github.com/repos/m-labs/artiq/issues/394","repository_url":"https://api.github.com/repos/m-labs/artiq","labels_url":"https://api.github.com/repos/m-labs/artiq/issues/394/labels{/name}","comments_url":"https://api.github.com/repos/m-labs/artiq/issues/394/comments","events_url":"https://api.github.com/repos/m-labs/artiq/issues/394/events","html_url":"https://github.com/m-labs/artiq/issues/394","id":148218463,"number":394,"title":"core device traceback decoding problem on Windows","user":{"login":"r-srinivas","id":11219276,"avatar_url":"https://avatars.githubusercontent.com/u/11219276?v=3","gravatar_id":"","url":"https://api.github.com/users/r-srinivas","html_url":"https://github.com/r-srinivas","followers_url":"https://api.github.com/users/r-srinivas/followers","following_url":"https://api.github.com/users/r-srinivas/following{/other_user}","gists_url":"https://api.github.com/users/r-srinivas/gists{/gist_id}","starred_url":"https://api.github.com/users/r-srinivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-srinivas/subscriptions","organizations_url":"https://api.github.com/users/r-srinivas/orgs","repos_url":"https://api.github.com/users/r-srinivas/repos","events_url":"https://api.github.com/users/r-srinivas/events{/privacy}","received_events_url":"https://api.github.com/users/r-srinivas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/m-labs/artiq/milestones/1","html_url":"https://github.com/m-labs/artiq/milestones/1.0","labels_url":"https://api.github.com/repos/m-labs/artiq/milestones/1/labels","id":1543322,"number":1,"title":"1.0","description":"","creator":{"login":"jordens","id":1338946,"avatar_url":"https://avatars.githubusercontent.com/u/1338946?v=3","gravatar_id":"","url":"https://api.github.com/users/jordens","html_url":"https://github.com/jordens","followers_url":"https://api.github.com/users/jordens/followers","following_url":"https://api.github.com/users/jordens/following{/other_user}","gists_url":"https://api.github.com/users/jordens/gists{/gist_id}","starred_url":"https://api.github.com/users/jordens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordens/subscriptions","organizations_url":"https://api.github.com/users/jordens/orgs","repos_url":"https://api.github.com/users/jordens/repos","events_url":"https://api.github.com/users/jordens/events{/privacy}","received_events_url":"https://api.github.com/users/jordens/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":82,"state":"open","created_at":"2016-01-26T04:36:52Z","updated_at":"2016-04-15T06:58:10Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2016-04-14T00:31:56Z","updated_at":"2016-04-15T17:20:53Z","closed_at":"2016-04-14T09:54:17Z","body":"My device_db contains DDS entries like,\r\n\r\n```\r\n    \"dds0\": {\r\n        \"type\": \"local\",\r\n        \"module\": \"artiq.coredevice.dds\",\r\n        \"class\": \"AD9914\",\r\n        \"arguments\": {\"bus_channel\": 58, \"channel\": 0},\r\n        \"comment\": \"Comments work in DDS panel as well\"\r\n    },\r\n```\r\n\r\nAnd I'm running the following experiment,\r\n\r\n```Python\r\nfrom artiq.experiment import *\r\n\r\n\r\nclass DDS_Set(EnvExperiment):\r\n    def build(self):\r\n     \r\n        self.setattr_device(\"core\")\r\n        self.setattr_device(\"core_dds\")\r\n        self.setattr_device(\"dds0\")\r\n        self.setattr_device(\"dds2\")\r\n        self.setattr_device(\"dds3\")\r\n        self.setattr_device(\"dds4\")\r\n        self.setattr_device(\"dds5\")\r\n\r\n\r\n\r\n\r\n    @kernel\r\n    def run(self):\r\n        with self.core_dds.batch:\r\n            self.dds0.set(100*MHz)\r\n            self.dds2.set(200*MHz)\r\n            self.dds3.set(200*MHz)\r\n            self.dds4.set(200*MHz)\r\n            self.dds5.set(200*MHz)\r\n```\r\n\r\nThe DDS bus channel is actually 50, not 58 as it was previously after the recent changes. I built a new bitstream and flashed the FPGA. If I run the experiment with the incorrect bus channel on windows, I get the following error message,\r\n\r\n```\r\nWARNING:worker(1149,dds_set.py):artiq.coredevice.comm_generic:Mismatch between g\r\nateware (1.0rc1+204.gfaa268e) and software (1.0rc2) versions\r\nERROR:worker(1149,dds_set.py):root:Terminating with exception (UnicodeDecodeErro\r\nr: 'utf-8' codec can't decode byte 0xdd in position 324: invalid continuation by\r\nte)\r\nTraceback (most recent call last):\r\n  File \"C:\\Anaconda3\\envs\\artiq-2016-04-04\\lib\\site-packages\\artiq\\master\\worker\r\n_impl.py\", line 231, in main\r\n    exp_inst.run()\r\n  File \"C:\\Anaconda3\\envs\\artiq-2016-04-04\\lib\\site-packages\\artiq\\language\\core\r\n.py\", line 192, in run_on_core\r\n    return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)\r\n  File \"C:\\Anaconda3\\envs\\artiq-2016-04-04\\lib\\site-packages\\artiq\\coredevice\\co\r\nre.py\", line 108, in run\r\n    self.comm.serve(object_map, symbolizer)\r\n  File \"C:\\Anaconda3\\envs\\artiq-2016-04-04\\lib\\site-packages\\artiq\\coredevice\\co\r\nmm_generic.py\", line 527, in serve\r\n    self._serve_exception(object_map, symbolizer)\r\n  File \"C:\\Anaconda3\\envs\\artiq-2016-04-04\\lib\\site-packages\\artiq\\coredevice\\co\r\nmm_generic.py\", line 508, in _serve_exception\r\n    traceback = list(reversed(symbolizer(backtrace))) + \\\r\n  File \"C:\\Anaconda3\\envs\\artiq-2016-04-04\\lib\\site-packages\\artiq\\coredevice\\co\r\nre.py\", line 89, in <lambda>\r\n    lambda addresses: target.symbolize(library, addresses)\r\n  File \"C:\\Anaconda3\\envs\\artiq-2016-04-04\\lib\\site-packages\\artiq\\compiler\\targ\r\nets.py\", line 166, in symbolize\r\n    library=library) \\\r\n  File \"C:\\Anaconda3\\envs\\artiq-2016-04-04\\lib\\site-packages\\artiq\\compiler\\targ\r\nets.py\", line 39, in __enter__\r\n    tempfiles[\"__stdout__\"] = stdout.decode('utf-8')\r\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0xdd in position 324: invali\r\nd continuation byte\r\nERROR:master:artiq.master.scheduler:got worker exception in run stage, deleting\r\nRID 1149\r\n```\r\n\r\nOn linux, I get a more explicit error message,\r\n\r\n```\r\nWARNING:worker(3084,dds_set.py):artiq.coredevice.comm_generic:Mismatch between gateware (1.0rc1+204.gfaa268e) and software (1.0rc2) versions\r\nERROR:worker(3084,dds_set.py):root:Terminating with exception (DDSError: Attempted to use invalid DDS bus)\r\nCore Device Traceback (most recent call last):\r\n  File \"/home/rabi/artiq-master/repository/dds_set.py\", line 27, in artiq_worker_dds_set.DDS_Set.run (RA=0x16e8)\r\n    with self.core_dds.batch:\r\n  File \"<artiq>/coredevice/dds.py\", line 42, in artiq.coredevice.dds._BatchContextManager.__exit__ (RA=0xed8)\r\n    self.core_dds.dds_batch_exit()\r\n  File \"<artiq>/coredevice/dds.py\", line 71, in artiq.coredevice.dds.CoreDDS.dds_batch_exit (inlined)\r\n    dds_batch_exit()\r\n  File \"/home/rabi/artiq-dev/artiq/artiq/runtime/dds.c\", line 97, in dds_set_one\r\n    artiq_raise_from_c(\"DDSError\", \"Attempted to use invalid DDS bus\", 0, 0, 0);\r\nartiq.coredevice.exceptions.DDSError(0): Attempted to use invalid DDS bus\r\nTraceback (most recent call last):\r\n  File \"/home/rabi/anaconda3/envs/artiq-2016-04-13/lib/python3.5/site-packages/artiq/master/worker_impl.py\", line 231, in main\r\n    exp_inst.run()\r\n  File \"/home/rabi/anaconda3/envs/artiq-2016-04-13/lib/python3.5/site-packages/artiq/language/core.py\", line 192, in run_on_core\r\n    return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)\r\n  File \"/home/rabi/anaconda3/envs/artiq-2016-04-13/lib/python3.5/site-packages/artiq/coredevice/core.py\", line 108, in run\r\n    self.comm.serve(object_map, symbolizer)\r\n  File \"/home/rabi/anaconda3/envs/artiq-2016-04-13/lib/python3.5/site-packages/artiq/coredevice/comm_generic.py\", line 527, in serve\r\n    self._serve_exception(object_map, symbolizer)\r\n  File \"/home/rabi/anaconda3/envs/artiq-2016-04-13/lib/python3.5/site-packages/artiq/coredevice/comm_generic.py\", line 519, in _serve_exception\r\n    raise python_exn\r\nartiq.coredevice.exceptions.DDSError: Attempted to use invalid DDS bus\r\nERROR:master:artiq.master.scheduler:got worker exception in run stage, deleting RID 3084\r\n```\r\n\r\nIf I correct the bus channel the experiment runs but I get the OSError on both systems as in #393.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/m-labs/artiq/issues/comments/210553097","html_url":"https://github.com/m-labs/artiq/issues/394#issuecomment-210553097","issue_url":"https://api.github.com/repos/m-labs/artiq/issues/394","id":210553097,"user":{"login":"r-srinivas","id":11219276,"avatar_url":"https://avatars.githubusercontent.com/u/11219276?v=3","gravatar_id":"","url":"https://api.github.com/users/r-srinivas","html_url":"https://github.com/r-srinivas","followers_url":"https://api.github.com/users/r-srinivas/followers","following_url":"https://api.github.com/users/r-srinivas/following{/other_user}","gists_url":"https://api.github.com/users/r-srinivas/gists{/gist_id}","starred_url":"https://api.github.com/users/r-srinivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-srinivas/subscriptions","organizations_url":"https://api.github.com/users/r-srinivas/orgs","repos_url":"https://api.github.com/users/r-srinivas/repos","events_url":"https://api.github.com/users/r-srinivas/events{/privacy}","received_events_url":"https://api.github.com/users/r-srinivas/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T17:20:53Z","updated_at":"2016-04-15T17:20:53Z","body":"From main. \r\n\r\n```\r\n\r\nC:\\Anaconda3\\artiq_test>call activate artiq-2016-04-15\r\nDeactivating environment \"C:\\Anaconda3\"...\r\nActivating environment \"C:\\Anaconda3\\envs\\artiq-2016-04-15\"...\r\n[artiq-2016-04-15] C:\\Anaconda3\\artiq_test>python -c \"import artiq; print(artiq.\r\n__version__)\"\r\n1.0rc2\r\n```"}}