René's URL Explorer Experiment


Title: RecursionError when unpickling message object · Issue #804 · hardbyte/python-can · GitHub

Open Graph Title: RecursionError when unpickling message object · Issue #804 · hardbyte/python-can

X Title: RecursionError when unpickling message object · Issue #804 · hardbyte/python-can

Description: Python 3.7.5 python-can 3.3.2 To hand over messages to another process I intended to use multiprocessing.JoinableQueue. I stumbled over a RecursionError and tracked it down to the pickleing that is used to serialize the objects (see exam...

Open Graph Description: Python 3.7.5 python-can 3.3.2 To hand over messages to another process I intended to use multiprocessing.JoinableQueue. I stumbled over a RecursionError and tracked it down to the pickleing that is...

X Description: Python 3.7.5 python-can 3.3.2 To hand over messages to another process I intended to use multiprocessing.JoinableQueue. I stumbled over a RecursionError and tracked it down to the pickleing that is...

Opengraph URL: https://github.com/hardbyte/python-can/issues/804

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RecursionError when unpickling message object","articleBody":"Python 3.7.5\r\npython-can 3.3.2\r\n\r\nTo hand over messages to another process I intended to use multiprocessing.JoinableQueue.\r\nI stumbled over a RecursionError and tracked it down to the pickleing that is used to serialize the objects (see example code).\r\n\r\nThe error occurs when calling loads() on the serialized message.\r\n\r\nI'm not a python expert and found some clues regarding the \\_\\_getattr\\_\\_ method. Maybe a custom \\_\\_getattr\\_\\_ method is needed for the message objects?\r\n\r\nIs there another way to hand over the emssage objects to another process?\r\n\r\n~~~\r\n#!/usr/bin/env python3\r\nimport can\r\nimport logging\r\nimport pickle\r\n\r\nclass CanReader():\r\n    \"\"\"\r\n    Reads messages from a configured can bus and puts them into a queue for further processing\r\n    \"\"\"\r\n\r\n    def __init__(self):\r\n        LOG_FORMAT = '%(asctime)s:%(threadName)s:%(levelname)s: %(message)s'\r\n        logging.basicConfig(format=LOG_FORMAT, level=logging.INFO)\r\n\r\n\r\n    def run(self):\r\n        can.rc['interface'] = 'socketcan_ctypes'\r\n        can.rc['channel'] = \"vcan0\"\r\n\r\n        can_bus = can.interface.Bus()\r\n\r\n        try:\r\n            for can_msg in can_bus:\r\n                if can_msg is  None:\r\n                    continue\r\n\r\n                pick = pickle.dumps(can_msg)\r\n                logging.info(\"pickled\")\r\n                unpick = pickle.loads(pick)\r\n                logging.info(\"unpickled\")\r\n\r\n        except KeyboardInterrupt:\r\n            logging.error(\"KeyboardInterrupt - Stopping CanReader\")\r\n\r\n        return\r\n\r\nif __name__ == \"__main__\":\r\n    canReader = CanReader()\r\n    canReader.run()\r\n~~~\r\n\r\n\r\nConsole output:\r\n~~~\r\n/usr/bin/python3.7 /XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SerializationTest.py\r\n2020-04-02 13:35:59,352:MainThread:INFO: Created a socket\r\n2020-04-02 13:35:59,389:MainThread:INFO: pickled\r\nTraceback (most recent call last):\r\n  File \"/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SerializationTest.py\", line 39, in \u003cmodule\u003e\r\n    canReader.run()\r\n  File \"/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SerializationTest.py\", line 29, in run\r\n    unpick = pickle.loads(pick)\r\n  File \"/home/XXXXXX/.local/lib/python3.7/site-packages/can/message.py\", line 59, in __getattr__\r\n    return self._dict[key]\r\n  File \"/home/XXXXXX/.local/lib/python3.7/site-packages/can/message.py\", line 59, in __getattr__\r\n    return self._dict[key]\r\n  File \"/home/XXXXXX/.local/lib/python3.7/site-packages/can/message.py\", line 59, in __getattr__\r\n    return self._dict[key]\r\n  [Previous line repeated 494 more times]\r\n  File \"/home/XXXXXX/.local/lib/python3.7/site-packages/can/message.py\", line 58, in __getattr__\r\n    warnings.warn(\"Custom attributes of messages are deprecated and will be removed in 4.0\", DeprecationWarning)\r\nRecursionError: maximum recursion depth exceeded while calling a Python object\r\n\r\nProcess finished with exit code 1\r\n~~~","author":{"url":"https://github.com/fpetry","@type":"Person","name":"fpetry"},"datePublished":"2020-04-02T11:46:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/804/python-can/issues/804"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5e9a1287-b0e4-841b-aa03-c11dec37fb0f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8D60:4FFB3:443A38:5D965F:6A61772B
html-safe-noncedfc9463ba77fd4e3373fb4a70b8cbb9771df714cad459432648112149b29b520
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDYwOjRGRkIzOjQ0M0EzODo1RDk2NUY6NkE2MTc3MkIiLCJ2aXNpdG9yX2lkIjoiNzU4OTYyOTY4Mjg2Mjk1ODUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdbd18275912376db824e9f3448102ec63446f8da37698d87df1eb356aa8d088f
hovercard-subject-tagissue:592569105
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/hardbyte/python-can/804/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3d752cdd87060812a5a1b2de256ad9d389c6bff20594d4d9f1b375ff65ee0ebe/hardbyte/python-can/issues/804
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3d752cdd87060812a5a1b2de256ad9d389c6bff20594d4d9f1b375ff65ee0ebe/hardbyte/python-can/issues/804
og:image:altPython 3.7.5 python-can 3.3.2 To hand over messages to another process I intended to use multiprocessing.JoinableQueue. I stumbled over a RecursionError and tracked it down to the pickleing that is...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefpetry
hostnamegithub.com
expected-hostnamegithub.com
Noneb05bb6314e7e93021a7b7dab54a85cbe48d821938e762c1dff815efd60699622
turbo-cache-controlno-preview
go-importgithub.com/hardbyte/python-can git https://github.com/hardbyte/python-can.git
octolytics-dimension-user_id855189
octolytics-dimension-user_loginhardbyte
octolytics-dimension-repository_id69090889
octolytics-dimension-repository_nwohardbyte/python-can
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id69090889
octolytics-dimension-repository_network_root_nwohardbyte/python-can
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
release94389bfdcd393b0a5a274aee94e8a9739d063fe5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/hardbyte/python-can/issues/804#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhardbyte%2Fpython-can%2Fissues%2F804
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
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2Fhardbyte%2Fpython-can%2Fissues%2F804
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=hardbyte%2Fpython-can
Reloadhttps://github.com/hardbyte/python-can/issues/804
Reloadhttps://github.com/hardbyte/python-can/issues/804
Reloadhttps://github.com/hardbyte/python-can/issues/804
hardbyte https://github.com/hardbyte
python-canhttps://github.com/hardbyte/python-can
Notifications https://github.com/login?return_to=%2Fhardbyte%2Fpython-can
Fork 686 https://github.com/login?return_to=%2Fhardbyte%2Fpython-can
Star 1.6k https://github.com/login?return_to=%2Fhardbyte%2Fpython-can
Code https://github.com/hardbyte/python-can
Issues 224 https://github.com/hardbyte/python-can/issues
Pull requests 34 https://github.com/hardbyte/python-can/pulls
Discussions https://github.com/hardbyte/python-can/discussions
Actions https://github.com/hardbyte/python-can/actions
Security and quality 0 https://github.com/hardbyte/python-can/security
Insights https://github.com/hardbyte/python-can/pulse
Code https://github.com/hardbyte/python-can
Issues https://github.com/hardbyte/python-can/issues
Pull requests https://github.com/hardbyte/python-can/pulls
Discussions https://github.com/hardbyte/python-can/discussions
Actions https://github.com/hardbyte/python-can/actions
Security and quality https://github.com/hardbyte/python-can/security
Insights https://github.com/hardbyte/python-can/pulse
RecursionError when unpickling message objecthttps://github.com/hardbyte/python-can/issues/804#top
bughttps://github.com/hardbyte/python-can/issues?q=state%3Aopen%20label%3A%22bug%22
3.3.4 Releasehttps://github.com/hardbyte/python-can/milestone/9
https://github.com/fpetry
fpetryhttps://github.com/fpetry
on Apr 2, 2020https://github.com/hardbyte/python-can/issues/804#issue-592569105
bughttps://github.com/hardbyte/python-can/issues?q=state%3Aopen%20label%3A%22bug%22
3.3.4 Releasehttps://github.com/hardbyte/python-can/milestone/9
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.