Title: Can't read hexadecimal nodeID from DCF · Issue #221 · canopen-python/canopen · GitHub
Open Graph Title: Can't read hexadecimal nodeID from DCF · Issue #221 · canopen-python/canopen
X Title: Can't read hexadecimal nodeID from DCF · Issue #221 · canopen-python/canopen
Description: hallo, While loading my dcf file i got the following error: source = './bin/SOMEDCF.dcf', node_id = 10 def import_eds(source, node_id): eds = RawConfigParser() if hasattr(source, "read"): fp = source else: fp = open(source) try: # Python...
Open Graph Description: hallo, While loading my dcf file i got the following error: source = './bin/SOMEDCF.dcf', node_id = 10 def import_eds(source, node_id): eds = RawConfigParser() if hasattr(source, "read"): fp = sour...
X Description: hallo, While loading my dcf file i got the following error: source = './bin/SOMEDCF.dcf', node_id = 10 def import_eds(source, node_id): eds = RawConfigParser() if hasattr(source, "read...
Opengraph URL: https://github.com/canopen-python/canopen/issues/221
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't read hexadecimal nodeID from DCF","articleBody":"hallo, \r\n\r\nWhile loading my dcf file i got the following error:\r\n\r\n source = './bin/SOMEDCF.dcf', node_id = 10\r\n \r\n def import_eds(source, node_id):\r\n eds = RawConfigParser()\r\n if hasattr(source, \"read\"):\r\n fp = source\r\n else:\r\n fp = open(source)\r\n try:\r\n # Python 3\r\n eds.read_file(fp)\r\n except AttributeError:\r\n # Python 2\r\n eds.readfp(fp)\r\n fp.close()\r\n od = objectdictionary.ObjectDictionary()\r\n if eds.has_section(\"DeviceComissioning\"):\r\n od.bitrate = int(eds.get(\"DeviceComissioning\", \"Baudrate\")) * 1000\r\n od.node_id = int(eds.get(\"DeviceComissioning\", \"NodeID\"))\r\n E ValueError: invalid literal for int() with base 10: '0x0A'\r\n \r\n ../../../.local/lib/python3.8/site-packages/canopen/objectdictionary/eds.py:36: ValueError\r\n\r\nA part of the dcf:\r\n\r\n [DeviceComissioning]\r\n NodeID=0x0A\r\n NodeName=DEVICE_NAME\r\n BaudRate=1000\r\n NetNumber=1\r\n\r\nThe issue is solve by changing the nodeID to decimal but cia-306 states the following:\r\n\r\n Integer numbers shall be written as decimal numbers, hexadecimal numbers or octal numbers.\r\n Hexadecimal numbers are preceded by 0x. Octal numbers shall start with a leading 0 (not followed by\r\n x). If the entry contains a number the following lines are identical:\r\n keyname=10\r\n keyname=0xa\r\n keyname=0x0a\r\n keyname=0xA\r\n keyname=0x000A\r\n keyname=012\r\nsource cia 306 4.3 on page 9\r\n\r\nSo it think that all of them should be accepted.\r\n\r\nI have implemented the workaround, so this does not have that high of a priority for me. But i thought you would like to know.\r\n\r\nthanks in advance,\r\n\r\nwvdp","author":{"url":"https://github.com/wvanderp","@type":"Person","name":"wvanderp"},"datePublished":"2021-02-01T12:55:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/221/canopen/issues/221"}
| 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:2761f96e-4a0d-51ae-49c3-9e3345b2ad22 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D70C:A4600:226D4FE:2DF9743:6A5D76DD |
| html-safe-nonce | 508a8d6968acba2dc9f14d991d34f93d3339582899a9bc4980fc12ea2ebc4d55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzBDOkE0NjAwOjIyNkQ0RkU6MkRGOTc0Mzo2QTVENzZERCIsInZpc2l0b3JfaWQiOiI1Nzk3MjQxODAzMDI1MjUwMDEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 45104ed4314d2bbd8d37658d038f33c6d74a9f51156021a33d3d14c4c8e36775 |
| hovercard-subject-tag | issue:798324723 |
| 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/canopen-python/canopen/221/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f0cae405f73c62ceb43156622c673c0b9076afee1d2420a323b619f33de0ed62/canopen-python/canopen/issues/221 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f0cae405f73c62ceb43156622c673c0b9076afee1d2420a323b619f33de0ed62/canopen-python/canopen/issues/221 |
| og:image:alt | hallo, While loading my dcf file i got the following error: source = './bin/SOMEDCF.dcf', node_id = 10 def import_eds(source, node_id): eds = RawConfigParser() if hasattr(source, "read"): fp = sour... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wvanderp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/canopen-python/canopen git https://github.com/canopen-python/canopen.git |
| octolytics-dimension-user_id | 200581454 |
| octolytics-dimension-user_login | canopen-python |
| octolytics-dimension-repository_id | 68737600 |
| octolytics-dimension-repository_nwo | canopen-python/canopen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 68737600 |
| octolytics-dimension-repository_network_root_nwo | canopen-python/canopen |
| 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 | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width