Title: issue when using with smbus · Issue #7 · arnaudsj/python-daemon · GitHub
Open Graph Title: issue when using with smbus · Issue #7 · arnaudsj/python-daemon
X Title: issue when using with smbus · Issue #7 · arnaudsj/python-daemon
Description: I am not sure if this is an issue, i am very new to classes and as such i apologies if this is a really simple question. I am trying to read values from the SMbus python module, when i run it inside the class i get a bad descriptor error...
Open Graph Description: I am not sure if this is an issue, i am very new to classes and as such i apologies if this is a really simple question. I am trying to read values from the SMbus python module, when i run it insid...
X Description: I am not sure if this is an issue, i am very new to classes and as such i apologies if this is a really simple question. I am trying to read values from the SMbus python module, when i run it insid...
Opengraph URL: https://github.com/arnaudsj/python-daemon/issues/7
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"issue when using with smbus","articleBody":"I am not sure if this is an issue, i am very new to classes and as such i apologies if this is a really simple question.\r\n\r\nI am trying to read values from the SMbus python module, when i run it inside the class i get a bad descriptor error. If i run it outside the class it works fine, but i need to be able to call it withing the main program...\r\n\r\n\r\nThis is the error:\r\n File \"powertracker.py\", line 100, in \u003cmodule\u003e\r\n daemon_runner.do_action()\r\n File \"/usr/lib/pymodules/python2.7/daemon/runner.py\", line 186, in do_action\r\n func(self)\r\n File \"/usr/lib/pymodules/python2.7/daemon/runner.py\", line 131, in _start\r\n self.app.run()\r\n File \"powertracker.py\", line 80, in run\r\n amps = selfed.read_ain()\r\n File \"powertracker.py\", line 61, in read_ain\r\n bus.write_byte(0x48, 0)\r\n File \"/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv\r\n return fn(*args, **kwdefaults)\r\n File \"/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv\r\n self._set_addr(addr)\r\n File \"/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv\r\n ioctl(self._fd, SMBUS.I2C_SLAVE, addr)\r\nIOError: [Errno 9] Bad file descriptor","author":{"url":"https://github.com/fl1ck3r","@type":"Person","name":"fl1ck3r"},"datePublished":"2016-12-09T14:49:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/7/python-daemon/issues/7"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:10df893f-ac0e-58b7-b65e-52eface03a24 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A5C2:D9039:E04107:12E7B21:6A5F00DE |
| html-safe-nonce | 246c959d34ff4ee8251d24cdf30643ef2daf95153650ce1537bef7cd65b9ad4e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUMyOkQ5MDM5OkUwNDEwNzoxMkU3QjIxOjZBNUYwMERFIiwidmlzaXRvcl9pZCI6Ijg3OTQ5MzgyODM5NjMyMDk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8e5ecd2df8a4292e17099e2022cfa87b7bde5c80c3375247e024210284fd12f5 |
| hovercard-subject-tag | issue:194613908 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/arnaudsj/python-daemon/7/issue_layout |
| twitter:image | https://opengraph.githubassets.com/089b001170b07a350888725851dac1eadb06b8e5260015e551d2615c01cd755f/arnaudsj/python-daemon/issues/7 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/089b001170b07a350888725851dac1eadb06b8e5260015e551d2615c01cd755f/arnaudsj/python-daemon/issues/7 |
| og:image:alt | I am not sure if this is an issue, i am very new to classes and as such i apologies if this is a really simple question. I am trying to read values from the SMbus python module, when i run it insid... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fl1ck3r |
| hostname | github.com |
| expected-hostname | github.com |
| None | bf8fa4b42b6d150def6175efb9b0f1ec8e9628d7229ee2bdf6e850e7bdad923e |
| turbo-cache-control | no-preview |
| go-import | github.com/arnaudsj/python-daemon git https://github.com/arnaudsj/python-daemon.git |
| octolytics-dimension-user_id | 9855 |
| octolytics-dimension-user_login | arnaudsj |
| octolytics-dimension-repository_id | 559220 |
| octolytics-dimension-repository_nwo | arnaudsj/python-daemon |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 559220 |
| octolytics-dimension-repository_network_root_nwo | arnaudsj/python-daemon |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7debc3c6cd5de09c6e22b47a1b9982acb2aabb7b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width