René's URL Explorer Experiment


Title: Exception on forward.close after logging data with ENBT/A · Issue #319 · ottowayi/pycomm3 · GitHub

Open Graph Title: Exception on forward.close after logging data with ENBT/A · Issue #319 · ottowayi/pycomm3

X Title: Exception on forward.close after logging data with ENBT/A · Issue #319 · ottowayi/pycomm3

Description: Pre-checks running latest version enabled logging consulted the docs Description I'm running a long (hours) datalogger using pycomm3 sometime when I close the connection (PLC.close()) it will report a parse replay failure on the forward_...

Open Graph Description: Pre-checks running latest version enabled logging consulted the docs Description I'm running a long (hours) datalogger using pycomm3 sometime when I close the connection (PLC.close()) it will repor...

X Description: Pre-checks running latest version enabled logging consulted the docs Description I'm running a long (hours) datalogger using pycomm3 sometime when I close the connection (PLC.close()) it will r...

Opengraph URL: https://github.com/ottowayi/pycomm3/issues/319

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exception on forward.close after logging data with ENBT/A","articleBody":"**Pre-checks**\r\n- [x] running latest version \r\n- [x] enabled logging \r\n- [x] consulted the [docs](https://pycomm3.readthedocs.io/en/latest/) \r\n\r\n**Description**\r\nI'm running a long (hours) datalogger using pycomm3 sometime when I close the connection  (PLC.close()) it will report a parse replay failure on the forward_close(). Seems to happen more often after running for a longer (\u003e10 minutes) time. The datalogger will read a set of tags. And when I interrupt it using \u003cctrl-c\u003e the exception instructs pycomm3 to close the connection.\r\n\r\n**Target PLC**\r\nModel:  1756-L73\r\nFirmware Revision: 32.11\r\nOther Devices in CIP Path:  1756-ENBT/A v 5.006\r\n\r\n**Code Sample**\r\nStripped back to minimal\r\n\r\n```\r\nfrom pycomm3 import LogixDriver\r\nimport logging, time, datetime\r\nfrom pycomm3.exceptions import RequestError\r\n\r\nPLCAddress = 'PC15'\r\nPLC = LogixDriver(PLCAddress, init_program_tags= False)\r\nPLC.open()\r\nprint(PLC.info)\r\nlogging.info('Connected')\r\npacktags = 'A15S1_PackData','A16S1_PackData','A16S1S3_PackData','A16S3_PackData','A16S3S4_Packdata','A16S4_PackData','A16S4S5_Packdata','A16S5_PackData','A17S1_PackData','A17S2_PackData','A17S3_PackData'\r\ntry:\r\n    logging.info('Reading')\r\n    while True: # and ChangeCount \u003c 3:\r\n        for tagname in packtags:\r\n            packdata_i = PLC.read(tagname)\r\n            print('*' , end = '')\r\n        time.sleep(1)\r\n\r\nexcept KeyboardInterrupt:\r\n    pass\r\n\r\nexcept Exception as err:\r\n    logging.exception(err)\r\n    \r\nfinally:\r\n    logging.info('Disconnecting')\r\n    PLC.close()\r\n\r\n```\r\n\r\n**Additional context**\r\nOutput from DEBUG logging:\r\n```\r\n2024-07-25 07:22:30,514 Sending generic message: forward_close\r\n2024-07-25 07:22:30,515 Sent: GenericUnconnectedRequestPacket(message=[b'N', b'\\x02 \\x06$\\x01', b\"\\n\\x05'\\x04\\t\\x10\\xbd\\xea\u003eq\", b'\\x03\\x00\\x01\\x00 \\x02$\\x01'])     \r\n2024-07-25 07:22:30,520 Failed to parse reply\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\plompt\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\pycomm3\\cip\\data_types.py\", line 156, in encode\r\n    return cls._encode(value)\r\n           ^^^^^^^^^^^^^^^^^^\r\n  File \"C:\\Users\\plompt\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\pycomm3\\cip\\data_types.py\", line 216, in _encode\r\n    return pack(cls._format, value)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^\r\nstruct.error: ubyte format requires 0 \u003c= number \u003c= 255\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\plompt\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\pycomm3\\packets\\ethernetip.py\", line 127, in _parse_reply\r\n    self.service = Services.get(Services.from_reply(self.raw[40:41]))\r\n                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"C:\\Users\\plompt\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\pycomm3\\cip\\services.py\", line 99, in from_reply\r\n    val = cls.get(USINT.encode(USINT.decode(reply_service) - 128))\r\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"C:\\Users\\plompt\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\pycomm3\\cip\\data_types.py\", line 158, in encode\r\n    raise DataError(f\"Error packing {value!r} as {cls.__name__}\") from err\r\npycomm3.exceptions.DataError: Error packing -128 as USINT\r\n```\r\n\r\n\r\n","author":{"url":"https://github.com/tcplomp","@type":"Person","name":"tcplomp"},"datePublished":"2024-07-24T20:12:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/319/pycomm3/issues/319"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:edb77c89-b1a4-06ff-69a5-17a2355fa5a4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB928:37182F:1B4D02F:275B68E:6A4BCEAF
html-safe-nonceec5bf5efeaf164dc5e512e81be175b5f817e9b2b76ba79321bbf9bd3d7873d25
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTI4OjM3MTgyRjoxQjREMDJGOjI3NUI2OEU6NkE0QkNFQUYiLCJ2aXNpdG9yX2lkIjoiMzkwNzkxMDEzMjE3MjU3NDM4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3e75262c06605f5abaf3b537834f0b52513015377298e2a9c9ba2906c1ae0bdc
hovercard-subject-tagissue:2428390421
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ottowayi/pycomm3/319/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7bcf6fa85371885721aa00cd5711b1e15f6f5eb6f269caf54cacc00c6b475988/ottowayi/pycomm3/issues/319
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7bcf6fa85371885721aa00cd5711b1e15f6f5eb6f269caf54cacc00c6b475988/ottowayi/pycomm3/issues/319
og:image:altPre-checks running latest version enabled logging consulted the docs Description I'm running a long (hours) datalogger using pycomm3 sometime when I close the connection (PLC.close()) it will repor...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametcplomp
hostnamegithub.com
expected-hostnamegithub.com
None9df996be9551ac02247d09a2f7f64ece66c35ca28885d346e98fdfda9cdaa37b
turbo-cache-controlno-preview
go-importgithub.com/ottowayi/pycomm3 git https://github.com/ottowayi/pycomm3.git
octolytics-dimension-user_id5274950
octolytics-dimension-user_loginottowayi
octolytics-dimension-repository_id193241356
octolytics-dimension-repository_nwoottowayi/pycomm3
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id193241356
octolytics-dimension-repository_network_root_nwoottowayi/pycomm3
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb71208a1c9ec7ccf364087569d0551f665dda674
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ottowayi/pycomm3/issues/319#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fottowayi%2Fpycomm3%2Fissues%2F319
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fottowayi%2Fpycomm3%2Fissues%2F319
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ottowayi%2Fpycomm3
Reloadhttps://github.com/ottowayi/pycomm3/issues/319
Reloadhttps://github.com/ottowayi/pycomm3/issues/319
Reloadhttps://github.com/ottowayi/pycomm3/issues/319
ottowayi https://github.com/ottowayi
pycomm3https://github.com/ottowayi/pycomm3
Notifications https://github.com/login?return_to=%2Fottowayi%2Fpycomm3
Fork 108 https://github.com/login?return_to=%2Fottowayi%2Fpycomm3
Star 506 https://github.com/login?return_to=%2Fottowayi%2Fpycomm3
Code https://github.com/ottowayi/pycomm3
Issues 35 https://github.com/ottowayi/pycomm3/issues
Pull requests 4 https://github.com/ottowayi/pycomm3/pulls
Discussions https://github.com/ottowayi/pycomm3/discussions
Actions https://github.com/ottowayi/pycomm3/actions
Projects https://github.com/ottowayi/pycomm3/projects
Security and quality 0 https://github.com/ottowayi/pycomm3/security
Insights https://github.com/ottowayi/pycomm3/pulse
Code https://github.com/ottowayi/pycomm3
Issues https://github.com/ottowayi/pycomm3/issues
Pull requests https://github.com/ottowayi/pycomm3/pulls
Discussions https://github.com/ottowayi/pycomm3/discussions
Actions https://github.com/ottowayi/pycomm3/actions
Projects https://github.com/ottowayi/pycomm3/projects
Security and quality https://github.com/ottowayi/pycomm3/security
Insights https://github.com/ottowayi/pycomm3/pulse
Exception on forward.close after logging data with ENBT/Ahttps://github.com/ottowayi/pycomm3/issues/319#top
bugSomething isn't workinghttps://github.com/ottowayi/pycomm3/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/tcplomp
tcplomphttps://github.com/tcplomp
on Jul 24, 2024https://github.com/ottowayi/pycomm3/issues/319#issue-2428390421
docshttps://pycomm3.readthedocs.io/en/latest/
bugSomething isn't workinghttps://github.com/ottowayi/pycomm3/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.