{"action":"created","issue":{"url":"https://api.github.com/repos/hgrecco/pyvisa/issues/241","repository_url":"https://api.github.com/repos/hgrecco/pyvisa","labels_url":"https://api.github.com/repos/hgrecco/pyvisa/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/hgrecco/pyvisa/issues/241/comments","events_url":"https://api.github.com/repos/hgrecco/pyvisa/issues/241/events","html_url":"https://github.com/hgrecco/pyvisa/issues/241","id":183604185,"number":241,"title":"pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.","user":{"login":"dishantarora","id":10178544,"avatar_url":"https://avatars.githubusercontent.com/u/10178544?v=3","gravatar_id":"","url":"https://api.github.com/users/dishantarora","html_url":"https://github.com/dishantarora","followers_url":"https://api.github.com/users/dishantarora/followers","following_url":"https://api.github.com/users/dishantarora/following{/other_user}","gists_url":"https://api.github.com/users/dishantarora/gists{/gist_id}","starred_url":"https://api.github.com/users/dishantarora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dishantarora/subscriptions","organizations_url":"https://api.github.com/users/dishantarora/orgs","repos_url":"https://api.github.com/users/dishantarora/repos","events_url":"https://api.github.com/users/dishantarora/events{/privacy}","received_events_url":"https://api.github.com/users/dishantarora/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-18T06:53:34Z","updated_at":"2016-10-18T11:32:06Z","closed_at":null,"body":"Hi,\r\n\r\nI am trying to use pyvisa for connecting Keysight's device on my localhost. Following is my script but I am continuously getting error\r\n\r\n`import visa\r\n\r\nrm = visa.ResourceManager()\r\n\r\nrm.list_resources()\r\ninstrument = rm.open_resource('TCPIP0::localhost::inst0::INSTR')\r\ninstrument.timeout = 4000\r\nprint(instrument.query(\"*IDN?\"))\r\ninstrument.write(':JITT:HEF:PER:AMPL? \"M1.DataOut1\"')\r\nprint(instrument.read())`\r\n\r\nError:\r\n\"C:\\Program Files (x86)\\Python27\\python.exe\" C:/Users/disarora/PycharmProjects/untitled2/script\r\nTraceback (most recent call last):\r\n  File \"C:/Users/disarora/PycharmProjects/untitled2/script\", line 8, in <module>\r\n    print(instrument.query(\"*IDN?\"))\r\n  File \"C:\\Program Files (x86)\\Python27\\lib\\site-packages\\pyvisa\\resources\\messagebased.py\", line 407, in query\r\n    return self.read()\r\n  File \"C:\\Program Files (x86)\\Python27\\lib\\site-packages\\pyvisa\\resources\\messagebased.py\", line 332, in read\r\n    message = self.read_raw().decode(enco)\r\n  File \"C:\\Program Files (x86)\\Python27\\lib\\site-packages\\pyvisa\\resources\\messagebased.py\", line 306, in read_raw\r\n    chunk, status = self.visalib.read(self.session, size)\r\n  File \"C:\\Program Files (x86)\\Python27\\lib\\site-packages\\pyvisa-sim\\highlevel.py\", line 187, in read\r\n    raise errors.VisaIOError(constants.VI_ERROR_TMO)\r\npyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.\r\n\r\nProcess finished with exit code 1\r\n"},"comment":{"url":"https://api.github.com/repos/hgrecco/pyvisa/issues/comments/254481182","html_url":"https://github.com/hgrecco/pyvisa/issues/241#issuecomment-254481182","issue_url":"https://api.github.com/repos/hgrecco/pyvisa/issues/241","id":254481182,"user":{"login":"MatthieuDartiailh","id":4481740,"avatar_url":"https://avatars.githubusercontent.com/u/4481740?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthieuDartiailh","html_url":"https://github.com/MatthieuDartiailh","followers_url":"https://api.github.com/users/MatthieuDartiailh/followers","following_url":"https://api.github.com/users/MatthieuDartiailh/following{/other_user}","gists_url":"https://api.github.com/users/MatthieuDartiailh/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthieuDartiailh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthieuDartiailh/subscriptions","organizations_url":"https://api.github.com/users/MatthieuDartiailh/orgs","repos_url":"https://api.github.com/users/MatthieuDartiailh/repos","events_url":"https://api.github.com/users/MatthieuDartiailh/events{/privacy}","received_events_url":"https://api.github.com/users/MatthieuDartiailh/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T11:32:06Z","updated_at":"2016-10-18T11:32:06Z","body":"When setting the read/write termination you should not add them to each read/write call (which you did). I guess you looked up the termination character in the manual, could you try checking that you can communicate using NiMAX, if this fails it means the termination is wrong."}}
{"actor":{"display_login":"MatthieuDartiailh"}}