{"action":"created","issue":{"url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/193","labels_url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/193/comments","events_url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/193/events","html_url":"https://github.com/NeuralEnsemble/python-neo/issues/193","id":64347338,"number":193,"title":"PlexonIO Index Error","user":{"login":"gcwarner1","id":10564844,"avatar_url":"https://avatars.githubusercontent.com/u/10564844?v=3","gravatar_id":"","url":"https://api.github.com/users/gcwarner1","html_url":"https://github.com/gcwarner1","followers_url":"https://api.github.com/users/gcwarner1/followers","following_url":"https://api.github.com/users/gcwarner1/following{/other_user}","gists_url":"https://api.github.com/users/gcwarner1/gists{/gist_id}","starred_url":"https://api.github.com/users/gcwarner1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcwarner1/subscriptions","organizations_url":"https://api.github.com/users/gcwarner1/orgs","repos_url":"https://api.github.com/users/gcwarner1/repos","events_url":"https://api.github.com/users/gcwarner1/events{/privacy}","received_events_url":"https://api.github.com/users/gcwarner1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NeuralEnsemble/python-neo/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/NeuralEnsemble/python-neo/labels/IO","name":"IO","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-25T18:58:38Z","updated_at":"2015-03-26T20:30:14Z","closed_at":null,"body":"My code:\r\n```python\r\nimport sys\r\nsys.path.append('/space/kgh/1/users/helmer/anaconda/lib/python2.7/site-packages/')\r\nfrom neo.io import PlexonIO\r\ndir = \"/autofs/homes/008/gwarner/Space_vs_Object_Learning_Stim-Flippe-01-06-2010.plx\"\r\nreader = PlexonIO(filename=dir)\r\nblks = reader.read(lazy=True, cascade=True)\r\nfor blk in blks:\r\n        for seg in blk.segments:\r\n                print seg.name\r\n                for anasig in seg.analogsignals:\r\n                        print anasig\r\n        for seg in blk.segments:\r\n                print seg\r\n                for st in seg.spiketrains:\r\n                        print st\r\n```\r\nRuns for a fairly long time before returning:\r\n```python\r\nTraceback (most recent call last):\r\n  File \"neo_plx_test.py\", line 7, in <module>\r\n    blks = reader.read(lazy=True, cascade=True)\r\n  File \"/space/kgh/1/users/helmer/anaconda/lib/python2.7/site-packages/neo-0.4.0dev-py2.7.egg/neo/io/baseio.py\", line 121, in read\r\n    seg = self.read_segment(lazy=lazy, cascade=cascade,  **kargs)\r\n  File \"/space/kgh/1/users/helmer/anaconda/lib/python2.7/site-packages/neo-0.4.0dev-py2.7.egg/neo/io/plexonio.py\", line 164, in read_segment\r\n    nb_spikes[chan,unit] +=1\r\nIndexError: index 79 is out of bounds for axis 0 with size 17\r\n```\r\nI added `print [chan,unit]` after line 162 in plexonio.py to try and see what was going on and it returned this:\r\n```\r\n[1, 0]\r\n[2, 0]\r\n[1, 0]\r\n[1, 0]\r\n[1, 0]\r\n[1, 0]\r\n[2, 0]\r\n[1, 0]\r\n[1, 0]\r\n...\r\n...\r\n...\r\n[79, 27]\r\n```\r\nAt which point it crashed and gave the aforementioned error. I also get this (https://github.com/NeuralEnsemble/python-neo/issues/188) error when running test_plexonio.py which could be related.\r\n"},"comment":{"url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/comments/86701931","html_url":"https://github.com/NeuralEnsemble/python-neo/issues/193#issuecomment-86701931","issue_url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/193","id":86701931,"user":{"login":"samuelgarcia","id":815627,"avatar_url":"https://avatars.githubusercontent.com/u/815627?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelgarcia","html_url":"https://github.com/samuelgarcia","followers_url":"https://api.github.com/users/samuelgarcia/followers","following_url":"https://api.github.com/users/samuelgarcia/following{/other_user}","gists_url":"https://api.github.com/users/samuelgarcia/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelgarcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelgarcia/subscriptions","organizations_url":"https://api.github.com/users/samuelgarcia/orgs","repos_url":"https://api.github.com/users/samuelgarcia/repos","events_url":"https://api.github.com/users/samuelgarcia/events{/privacy}","received_events_url":"https://api.github.com/users/samuelgarcia/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T20:30:14Z","updated_at":"2015-03-26T20:30:14Z","body":"Hi. I have the file. Thanks.\r\nI merge the PR#190 and it works. Could you also try git pull master.\r\nSorry not merging #190 before.\r\n"}}