{"action":"opened","issue":{"url":"https://api.github.com/repos/pyserial/pyserial/issues/46","labels_url":"https://api.github.com/repos/pyserial/pyserial/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/pyserial/pyserial/issues/46/comments","events_url":"https://api.github.com/repos/pyserial/pyserial/issues/46/events","html_url":"https://github.com/pyserial/pyserial/issues/46","id":121303849,"number":46,"title":"serialjava.py can't handle non-contiguous COM port numbers","user":{"login":"DMats","id":2530913,"avatar_url":"https://avatars.githubusercontent.com/u/2530913?v=3","gravatar_id":"","url":"https://api.github.com/users/DMats","html_url":"https://github.com/DMats","followers_url":"https://api.github.com/users/DMats/followers","following_url":"https://api.github.com/users/DMats/following{/other_user}","gists_url":"https://api.github.com/users/DMats/gists{/gist_id}","starred_url":"https://api.github.com/users/DMats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DMats/subscriptions","organizations_url":"https://api.github.com/users/DMats/orgs","repos_url":"https://api.github.com/users/DMats/repos","events_url":"https://api.github.com/users/DMats/events{/privacy}","received_events_url":"https://api.github.com/users/DMats/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-09T17:59:00Z","updated_at":"2015-12-09T17:59:00Z","closed_at":null,"body":"I have COM1, COM2, COM3, COM200 and tried to open COM200 using the command:\r\n```\r\nser = serial.Serial( port=199, baudrate=1500000, timeout=30 )\r\n```\r\nI received an index error \r\n```\r\n    ser = serial.Serial( port=199, baudrate=1500000, timeout=30 )\r\n  File \"C:\\jython2.7.0\\Lib\\site-packages\\serial\\serialutil.py\", line 269, in __init__\r\n    self.port     = port\r\n  File \"C:\\jython2.7.0\\Lib\\site-packages\\serial\\serialutil.py\", line 317, in setPort\r\n    self.portstr = self.makeDeviceName(port)\r\n  File \"C:\\jython2.7.0\\Lib\\site-packages\\serial\\serialjava.py\", line 143, in makeDeviceName\r\n    return device(port)\r\n  File \"C:\\jython2.7.0\\Lib\\site-packages\\serial\\serialjava.py\", line 49, in device\r\n    return ports[portnumber].getName()\r\nIndexError: index out of range: 199\r\n```\r\n\r\nI believe the error is on line 48 of serialjava.py.  Change ports.append(el) to ports.insert(portnumber, el)"}}