{"action":"created","issue":{"url":"https://api.github.com/repos/rm-hull/ssd1306/issues/95","repository_url":"https://api.github.com/repos/rm-hull/ssd1306","labels_url":"https://api.github.com/repos/rm-hull/ssd1306/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/rm-hull/ssd1306/issues/95/comments","events_url":"https://api.github.com/repos/rm-hull/ssd1306/issues/95/events","html_url":"https://github.com/rm-hull/ssd1306/issues/95","id":195690948,"number":95,"title":"Add error module","user":{"login":"thijstriemstra","id":305679,"avatar_url":"https://avatars.githubusercontent.com/u/305679?v=3","gravatar_id":"","url":"https://api.github.com/users/thijstriemstra","html_url":"https://github.com/thijstriemstra","followers_url":"https://api.github.com/users/thijstriemstra/followers","following_url":"https://api.github.com/users/thijstriemstra/following{/other_user}","gists_url":"https://api.github.com/users/thijstriemstra/gists{/gist_id}","starred_url":"https://api.github.com/users/thijstriemstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thijstriemstra/subscriptions","organizations_url":"https://api.github.com/users/thijstriemstra/orgs","repos_url":"https://api.github.com/users/thijstriemstra/repos","events_url":"https://api.github.com/users/thijstriemstra/events{/privacy}","received_events_url":"https://api.github.com/users/thijstriemstra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-15T01:15:06Z","updated_at":"2016-12-15T01:37:40Z","closed_at":null,"body":"I'm seeing errors from the smbus2 library, on OSX or Ubuntu without a valid I2C device connected, and it would be nice to have our own uniform exceptions for that, in case smbus2 or python decides to change their particular errors at some point.\r\n\r\n```\r\n File \"/Users/foo/projects/bar/ssd1306/oled/device.py\", line 66, in __init__\r\n    self._serial_interface = serial_interface or i2c()\r\n  File \"/Users/foo/projects/bar/ssd1306/oled/serial.py\", line 42, in __init__\r\n    self._bus = bus or smbus2.SMBus(port)\r\n  File \"/Users/foo/.virtualenvs/bar/lib/python3.5/site-packages/smbus2/smbus2.py\", line 132, in __init__\r\n    self.open(bus)\r\n  File \"/Users/foo/.virtualenvs/bar/lib/python3.5/site-packages/smbus2/smbus2.py\", line 142, in open\r\n    self.fd = os.open(\"/dev/i2c-{}\".format(bus), os.O_RDWR)\r\nFileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'\r\n```"},"comment":{"url":"https://api.github.com/repos/rm-hull/ssd1306/issues/comments/267211665","html_url":"https://github.com/rm-hull/ssd1306/issues/95#issuecomment-267211665","issue_url":"https://api.github.com/repos/rm-hull/ssd1306/issues/95","id":267211665,"user":{"login":"thijstriemstra","id":305679,"avatar_url":"https://avatars.githubusercontent.com/u/305679?v=3","gravatar_id":"","url":"https://api.github.com/users/thijstriemstra","html_url":"https://github.com/thijstriemstra","followers_url":"https://api.github.com/users/thijstriemstra/followers","following_url":"https://api.github.com/users/thijstriemstra/following{/other_user}","gists_url":"https://api.github.com/users/thijstriemstra/gists{/gist_id}","starred_url":"https://api.github.com/users/thijstriemstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thijstriemstra/subscriptions","organizations_url":"https://api.github.com/users/thijstriemstra/orgs","repos_url":"https://api.github.com/users/thijstriemstra/repos","events_url":"https://api.github.com/users/thijstriemstra/events{/privacy}","received_events_url":"https://api.github.com/users/thijstriemstra/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T01:37:40Z","updated_at":"2016-12-15T01:37:40Z","body":"Related to #25 "}}
{"actor":{"display_login":"thijstriemstra"}}