Title: Saving dynamic/empty PDOs: TypeError: unsupported operand type(s) for |: 'NoneType' and 'int' · Issue #445 · canopen-python/canopen · GitHub
Open Graph Title: Saving dynamic/empty PDOs: TypeError: unsupported operand type(s) for |: 'NoneType' and 'int' · Issue #445 · canopen-python/canopen
X Title: Saving dynamic/empty PDOs: TypeError: unsupported operand type(s) for |: 'NoneType' and 'int' · Issue #445 · canopen-python/canopen
Description: Currently, if you have dynamic PDOs, which are only defined but not configured in the EDS-File, you can not save them, because they are initialized with cob_id = None, which can not be compared in this loc in pdo/base.py:376 self.com_rec...
Open Graph Description: Currently, if you have dynamic PDOs, which are only defined but not configured in the EDS-File, you can not save them, because they are initialized with cob_id = None, which can not be compared in ...
X Description: Currently, if you have dynamic PDOs, which are only defined but not configured in the EDS-File, you can not save them, because they are initialized with cob_id = None, which can not be compared in ...
Opengraph URL: https://github.com/canopen-python/canopen/issues/445
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Saving dynamic/empty PDOs: TypeError: unsupported operand type(s) for |: 'NoneType' and 'int'","articleBody":"Currently, if you have dynamic PDOs, which are only defined but not configured in the EDS-File, you can not save them, because they are initialized with cob_id = None, which can not be compared in this loc in pdo/base.py:376\r\n\r\n`self.com_record[1].raw = self.cob_id | PDO_NOT_VALID | (RTR_NOT_ALLOWED if not self.rtr_allowed else 0x0)`\r\n \r\nAlso, map is initilized with [], but the save-check checks for None, which is never the case, so all pdo will be saved, even if they are empty.\r\n\r\nTest to reproduce:\r\n\r\n```\r\n def test_save_pdo(self):\r\n node = canopen.Node(1, EDS_PATH)\r\n node.tpdo.save()\r\n node.rpdo.save()\r\n```","author":{"url":"https://github.com/friederschueler","@type":"Person","name":"friederschueler"},"datePublished":"2024-05-27T08:50:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/445/canopen/issues/445"}
| 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:7d2a0836-2fd9-d055-1e89-d4757d36370e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9AEC:5592:2B30749:39BB8B5:6A5D9CD1 |
| html-safe-nonce | 44820b94b3c09302d639f38f59988f29c678243f65b78bdb82f1fe7acfe4fe14 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUVDOjU1OTI6MkIzMDc0OTozOUJCOEI1OjZBNUQ5Q0QxIiwidmlzaXRvcl9pZCI6IjIyNjU5NjIwMDE5NzY4OTI2MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c8c7e8fb05d8ad0d79aad6d36aa012e052c1406d45987f65e152d51247db4255 |
| hovercard-subject-tag | issue:2318612762 |
| 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/445/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4464b25a2019c4ca645296b10a29d8940ff4d54875536500415efde614ca3bda/canopen-python/canopen/issues/445 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4464b25a2019c4ca645296b10a29d8940ff4d54875536500415efde614ca3bda/canopen-python/canopen/issues/445 |
| og:image:alt | Currently, if you have dynamic PDOs, which are only defined but not configured in the EDS-File, you can not save them, because they are initialized with cob_id = None, which can not be compared in ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | friederschueler |
| 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