{"action":"created","issue":{"url":"https://api.github.com/repos/MrYsLab/PyMata/issues/32","repository_url":"https://api.github.com/repos/MrYsLab/PyMata","labels_url":"https://api.github.com/repos/MrYsLab/PyMata/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/MrYsLab/PyMata/issues/32/comments","events_url":"https://api.github.com/repos/MrYsLab/PyMata/issues/32/events","html_url":"https://github.com/MrYsLab/PyMata/issues/32","id":220745169,"number":32,"title":"firmataplus","user":{"login":"mingguichen","id":10821596,"avatar_url":"https://avatars3.githubusercontent.com/u/10821596?v=3","gravatar_id":"","url":"https://api.github.com/users/mingguichen","html_url":"https://github.com/mingguichen","followers_url":"https://api.github.com/users/mingguichen/followers","following_url":"https://api.github.com/users/mingguichen/following{/other_user}","gists_url":"https://api.github.com/users/mingguichen/gists{/gist_id}","starred_url":"https://api.github.com/users/mingguichen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingguichen/subscriptions","organizations_url":"https://api.github.com/users/mingguichen/orgs","repos_url":"https://api.github.com/users/mingguichen/repos","events_url":"https://api.github.com/users/mingguichen/events{/privacy}","received_events_url":"https://api.github.com/users/mingguichen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-10T19:26:03Z","updated_at":"2017-04-10T19:48:22Z","closed_at":null,"body":"Thanks for your great work. I got some issues with firmataplus and pymata in Python 2.7. With this setting, I can not start Arduino in Python anymore. DO you have some insights on that? Please see below for the error message.\r\n\r\nException in thread Thread-3:\r\nTraceback (most recent call last):\r\n  File \"C:\\Program Files\\Anaconda2\\lib\\threading.py\", line 801, in __bootstrap_inner\r\n    self.run()\r\n  File \"C:\\Program Files\\Anaconda2\\lib\\site-packages\\PyMata\\pymata_command_handler.py\", line 818, in run\r\n    method = dispatch_entry[0]\r\nTypeError: 'NoneType' object has no attribute '__getitem__'\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"C:\\Program Files\\Anaconda2\\lib\\site-packages\\spyderlib\\widgets\\externalshell\\sitecustomize.py\", line 699, in runfile\r\n    execfile(filename, namespace)\r\n  File \"C:\\Program Files\\Anaconda2\\lib\\site-packages\\spyderlib\\widgets\\externalshell\\sitecustomize.py\", line 74, in execfile\r\n    exec(compile(scripttext, filename, 'exec'), glob, loc)\r\n  File \"D:/Desktop/Vaziri lab/Francisca/Software/PyTimingTask/PyTimingTask.py\", line 57, in <module>\r\n    board.set_sampling_interval(1)\r\n  File \"C:\\Program Files\\Anaconda2\\lib\\site-packages\\PyMata\\pymata.py\", line 770, in set_sampling_interval\r\n    self._command_handler.send_sysex(self._command_handler.SAMPLING_INTERVAL, data)\r\n  File \"C:\\Program Files\\Anaconda2\\lib\\site-packages\\PyMata\\pymata_command_handler.py\", line 619, in send_sysex\r\n    self.pymata.transport.write(data)\r\n  File \"C:\\Program Files\\Anaconda2\\lib\\site-packages\\PyMata\\pymata_serial.py\", line 107, in write\r\n    self.arduino.write(data)\r\n  File \"C:\\Program Files\\Anaconda2\\lib\\site-packages\\serial\\serialwin32.py\", line 279, in write\r\n    if not self.hComPort: raise portNotOpenError\r\nserial.serialutil.SerialException: Attempting to use a port that is not open\r\n>>> "},"comment":{"url":"https://api.github.com/repos/MrYsLab/PyMata/issues/comments/293058750","html_url":"https://github.com/MrYsLab/PyMata/issues/32#issuecomment-293058750","issue_url":"https://api.github.com/repos/MrYsLab/PyMata/issues/32","id":293058750,"user":{"login":"MrYsLab","id":5189838,"avatar_url":"https://avatars3.githubusercontent.com/u/5189838?v=3","gravatar_id":"","url":"https://api.github.com/users/MrYsLab","html_url":"https://github.com/MrYsLab","followers_url":"https://api.github.com/users/MrYsLab/followers","following_url":"https://api.github.com/users/MrYsLab/following{/other_user}","gists_url":"https://api.github.com/users/MrYsLab/gists{/gist_id}","starred_url":"https://api.github.com/users/MrYsLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrYsLab/subscriptions","organizations_url":"https://api.github.com/users/MrYsLab/orgs","repos_url":"https://api.github.com/users/MrYsLab/repos","events_url":"https://api.github.com/users/MrYsLab/events{/privacy}","received_events_url":"https://api.github.com/users/MrYsLab/received_events","type":"User","site_admin":false},"created_at":"2017-04-10T19:48:21Z","updated_at":"2017-04-10T19:48:21Z","body":"@mingguichen The problem looks like a reset/streaming data issue. If your are able to run your script, but then restart it, the Arduino does not stop sendning data. When your script initializes, PyMata receives unexpected data and an exception is thrown.\r\n\r\nTry unplugging the Arduino and plugging it back in, then wait until the lights on the Arduino stop flashing and then start your script.\r\n\r\nPlease let me know if this solves the issue."}}
{"actor":{"display_login":"MrYsLab"}}