René's URL Explorer Experiment


Title: cannot use GUI backends inside django request handlers · Issue #11094 · matplotlib/matplotlib · GitHub

Open Graph Title: cannot use GUI backends inside django request handlers · Issue #11094 · matplotlib/matplotlib

X Title: cannot use GUI backends inside django request handlers · Issue #11094 · matplotlib/matplotlib

Description: Bug summary Matplotlib crash Python when trying to create a plot and save it as png Bug report Process: Python [7315] Path: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python Identifier: Python V...

Open Graph Description: Bug summary Matplotlib crash Python when trying to create a plot and save it as png Bug report Process: Python [7315] Path: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Co...

X Description: Bug summary Matplotlib crash Python when trying to create a plot and save it as png Bug report Process: Python [7315] Path: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Co...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/11094

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"cannot use GUI backends inside django request handlers","articleBody":"### Bug summary\r\n\r\nMatplotlib crash Python when trying to create a plot and save it as png\r\n\r\n### Bug report\r\n\r\n\u003e Process:               Python [7315]\r\n\u003e Path:                  /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python\r\n\u003e Identifier:            Python\r\n\u003e Version:               3.6.4 (3.6.4)\r\n\u003e Code Type:             X86-64 (Native)\r\n\u003e Parent Process:        bash [6754]\r\n\u003e Responsible:           Python [7315]\r\n\u003e User ID:               501\r\n\u003e \r\n\u003e Date/Time:             2018-04-20 19:30:12.654 +0300\r\n\u003e OS Version:            Mac OS X 10.13.4 (17E199)\r\n\u003e Report Version:        12\r\n\u003e Anonymous UUID:        E1B3F20E-1530-E700-1172-1C41E2D223CF\r\n\u003e \r\n\u003e Sleep/Wake UUID:       CB1FA7B5-1F06-41C5-8BB7-C34FF5EDF3DC\r\n\u003e \r\n\u003e Time Awake Since Boot: 65000 seconds\r\n\u003e Time Since Wake:       5400 seconds\r\n\u003e \r\n\u003e System Integrity Protection: enabled\r\n\u003e \r\n\u003e Crashed Thread:        0  Dispatch queue: com.apple.main-thread\r\n\u003e \r\n\u003e Exception Type:        EXC_CRASH (SIGILL)\r\n\u003e Exception Codes:       0x0000000000000000, 0x0000000000000000\r\n\u003e Exception Note:        EXC_CORPSE_NOTIFY\r\n\u003e \r\n\u003e Termination Signal:    Illegal instruction: 4\r\n\u003e Termination Reason:    Namespace SIGNAL, Code 0x4\r\n\u003e Terminating Process:   Python [7315]\r\n\u003e \r\n\u003e Thread 0 Crashed:: Dispatch queue: com.apple.main-thread\r\n\u003e 0   libsystem_kernel.dylib        \t0x00000001018f14aa __kill + 10\r\n\u003e 1   org.python.python             \t0x00000001008a47bb os_kill + 59\r\n\u003e 2   org.python.python             \t0x00000001007be4c8 _PyCFunction_FastCallDict + 552\r\n\u003e 3   org.python.python             \t0x0000000100847e94 call_function + 612\r\n\u003e 4   org.python.python             \t0x00000001008498a4 _PyEval_EvalFrameDefault + 5604\r\n\u003e 5   org.python.python             \t0x0000000100847bde fast_function + 606\r\n\u003e 6   org.python.python             \t0x0000000100847e7b call_function + 587\r\n\u003e 7   org.python.python             \t0x00000001008498a4 _PyEval_EvalFrameDefault + 5604\r\n\u003e 8   org.python.python             \t0x0000000100847230 _PyEval_EvalCodeWithName + 2720\r\n\u003e 9   org.python.python             \t0x0000000100847a5b fast_function + 219\r\n\u003e 10  org.python.python             \t0x0000000100847e7b call_function + 587\r\n\u003e 11  org.python.python             \t0x00000001008498a4 _PyEval_EvalFrameDefault + 5604\r\n\u003e 12  org.python.python             \t0x0000000100847230 _PyEval_EvalCodeWithName + 2720\r\n\u003e 13  org.python.python             \t0x00000001008480f7 _PyFunction_FastCallDict + 439\r\n\u003e 14  org.python.python             \t0x00000001007627c4 _PyObject_FastCallDict + 356\r\n\u003e 15  org.python.python             \t0x0000000100762e90 _PyObject_Call_Prepend + 208\r\n\u003e 16  org.python.python             \t0x00000001007621b3 PyObject_Call + 99\r\n\u003e 17  org.python.python             \t0x000000010084a326 _PyEval_EvalFrameDefault + 8294\r\n\u003e 18  org.python.python             \t0x0000000100847230 _PyEval_EvalCodeWithName + 2720\r\n\u003e 19  org.python.python             \t0x00000001008480f7 _PyFunction_FastCallDict + 439\r\n\u003e 20  org.python.python             \t0x00000001007627c4 _PyObject_FastCallDict + 356\r\n\u003e 21  org.python.python             \t0x0000000100762e90 _PyObject_Call_Prepend + 208\r\n\u003e 22  org.python.python             \t0x00000001007621b3 PyObject_Call + 99\r\n\u003e 23  org.python.python             \t0x000000010084a326 _PyEval_EvalFrameDefault + 8294\r\n\u003e 24  org.python.python             \t0x0000000100847230 _PyEval_EvalCodeWithName + 2720\r\n\u003e 25  org.python.python             \t0x00000001008480f7 _PyFunction_FastCallDict + 439\r\n\u003e 26  org.python.python             \t0x00000001007627c4 _PyObject_FastCallDict + 356\r\n\u003e 27  org.python.python             \t0x0000000100762e90 _PyObject_Call_Prepend + 208\r\n\u003e 28  org.python.python             \t0x00000001007621b3 PyObject_Call + 99\r\n\u003e 29  org.python.python             \t0x000000010084a326 _PyEval_EvalFrameDefault + 8294\r\n\u003e 30  org.python.python             \t0x0000000100847230 _PyEval_EvalCodeWithName + 2720\r\n\u003e 31  org.python.python             \t0x00000001008480f7 _PyFunction_FastCallDict + 439\r\n\u003e 32  org.python.python             \t0x00000001007627c4 _PyObject_FastCallDict + 356\r\n\u003e 33  org.python.python             \t0x0000000100762e90 _PyObject_Call_Prepend + 208\r\n\u003e 34  org.python.python             \t0x00000001007621b3 PyObject_Call + 99\r\n\u003e 35  org.python.python             \t0x000000010084a326 _PyEval_EvalFrameDefault + 8294\r\n\u003e 36  org.python.python             \t0x0000000100847bde fast_function + 606\r\n\u003e 37  org.python.python             \t0x0000000100847e7b call_function + 587\r\n\u003e 38  org.python.python             \t0x00000001008498a4 _PyEval_EvalFrameDefault + 5604\r\n\u003e 39  org.python.python             \t0x0000000100847bde fast_function + 606\r\n\u003e 40  org.python.python             \t0x0000000100847e7b call_function + 587\r\n\u003e 41  org.python.python             \t0x00000001008498a4 _PyEval_EvalFrameDefault + 5604\r\n\u003e 42  org.python.python             \t0x0000000100847230 _PyEval_EvalCodeWithName + 2720\r\n\u003e 43  org.python.python             \t0x0000000100847a5b fast_function + 219\r\n\u003e 44  org.python.python             \t0x0000000100847e7b call_function + 587\r\n\u003e 45  org.python.python             \t0x00000001008498a4 _PyEval_EvalFrameDefault + 5604\r\n\u003e 46  org.python.python             \t0x0000000100847230 _PyEval_EvalCodeWithName + 2720\r\n\u003e 47  org.python.python             \t0x00000001008473d4 PyEval_EvalCode + 100\r\n\u003e 48  org.python.python             \t0x0000000100883f7e PyRun_FileExFlags + 206\r\n\u003e 49  org.python.python             \t0x000000010088421f PyRun_SimpleFileExFlags + 447\r\n\u003e 50  org.python.python             \t0x000000010089d86a Py_Main + 3914\r\n\u003e 51  org.python.python             \t0x0000000100000dfe 0x100000000 + 3582\r\n\u003e 52  org.python.python             \t0x0000000100000c34 0x100000000 + 3124\r\n\u003e \r\n\u003e Thread 0 crashed with X86 Thread State (64-bit):\r\n\u003e   rax: 0x0000000000000000  rbx: 0x000000010da106c8  rcx: 0x00007fff5bffca78  rdx: 0x0000000000000000\r\n\u003e   rdi: 0x0000000000001c93  rsi: 0x0000000000000004  rbp: 0x00007fff5bffca90  rsp: 0x00007fff5bffca78\r\n\u003e    r8: 0x000000000000006e   r9: 0x0000000000000100  r10: 0x00000001015f8070  r11: 0x0000000000000206\r\n\u003e   r12: 0x0000000000000000  r13: 0x0000000101bbd948  r14: 0x0000000103519e68  r15: 0x00000001008a4780\r\n\u003e   rip: 0x00000001018f14aa  rfl: 0x0000000000000206  cr2: 0x00007fff5df24284\r\n\u003e   \r\n\u003e Logical CPU:     0\r\n\u003e Error Code:      0x02000025\r\n\u003e Trap Number:     133\r\n\u003e \r\n\u003e Model: MacBookPro11,1, BootROM MBP111.0145.B00, 2 processors, Intel Core i5, 2.6 GHz, 8 GB, SMC 2.16f68\r\n\r\n### Code for reproduction\r\n```python\r\nplt.clf()\r\n\tfor stat in all_subscriber_stats:\r\n\t\troaming_minutes_plot_data.append(stat.roaming_minutes)\r\n\t\troaming_gprs_plot_data.append(stat.roaming_gprs)\r\n\t\tinternational_calls_plot_data.append(stat.international_calls)\r\n\t\treporting_months_grid_data.append(\r\n\t\t\tf\"{stat.reporting_month} / {stat.reporting_year}\"\r\n\t\t)\r\n\ty = [\r\n\t\troaming_minutes_plot_data,\r\n\t\troaming_gprs_plot_data,\r\n\t\tinternational_calls_plot_data\r\n\t]\r\n\tplt.stackplot(\r\n\t\treporting_months_grid_data, y, labels=[\r\n\t\t\t'Roaming minutes',\r\n\t\t\t'Roaming GPRS',\r\n\t\t\t'International calls'\r\n\t\t]\r\n\t)\r\n\tplt.legend(loc='best')\r\n\tplt.ylabel('Rub')\r\n\tplt.xlabel(\"Months\")\r\n\tplt.grid(which='major', axis='both')\r\n\r\n\tplt.savefig(\r\n\t\tf'media/{subscriber.user_phone_number}'\r\n\t)\r\n\tsubscriber.spending_statistics_pic = f'{subscriber.user_phone_number}.png'\r\n\tsubscriber.save()\r\n```\r\n\r\n### Actual outcome\r\n\r\nThe crash of Python and Django server\r\n\r\n### Expected outcome\r\n\r\nmatplotlib should generate the *.png file and place it in the folder\r\n\r\n#### Matplotlib version\r\nmatplotlib installd via pip in PyCharm (venv)\r\n\r\n  * **Operating system:** Mac OS X 10.13.4 (17E199)\r\n  * **Matplotlib version:** 2.2.2\r\n  * **Matplotlib backend** (`print(matplotlib.get_backend())`): module://backend_interagg\r\n  * **Python version:** 3.6.4 \r\n  * **Other libraries:** \r\ncycler==0.10.0\r\nDjango==2.0.4\r\nkiwisolver==1.0.1\r\nnumpy==1.14.2\r\npandas==0.22.0\r\nPillow==5.1.0\r\npyparsing==2.2.0\r\npython-dateutil==2.7.2\r\npytz==2018.4\r\nsix==1.11.0\r\n\r\n\r\n## Important Note:\r\nSame code with same dependencies versions working 100%  on Windows10. The problem is only exclusive to Mac and began when I started using matplotlib in my code\r\n","author":{"url":"https://github.com/SimonOsipov","@type":"Person","name":"SimonOsipov"},"datePublished":"2018-04-20T16:48:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/11094/matplotlib/issues/11094"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8578749a-c5d9-4038-a2fb-dc864ca3a6ba
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBA88:204447:1F29BFA:2B35E27:6A548FDB
html-safe-nonce9eac3f945722f75f3efbc8cdbc5efd440f8c8c9099f0b8c23ea250fab9ee844f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTg4OjIwNDQ0NzoxRjI5QkZBOjJCMzVFMjc6NkE1NDhGREIiLCJ2aXNpdG9yX2lkIjoiNzg0MjQwNzQzMjk3NDUzNjY2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac08ef58e07565f40cbeff3d5538f34ffbc27152813289627cc80d4385e4c62d9b
hovercard-subject-tagissue:316339179
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/matplotlib/matplotlib/11094/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fe2d00d1955b1b95c9478a998a34b1efaf8b68bb91ebafe5b31fac8a3b35d0ec/matplotlib/matplotlib/issues/11094
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fe2d00d1955b1b95c9478a998a34b1efaf8b68bb91ebafe5b31fac8a3b35d0ec/matplotlib/matplotlib/issues/11094
og:image:altBug summary Matplotlib crash Python when trying to create a plot and save it as png Bug report Process: Python [7315] Path: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Co...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSimonOsipov
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
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
releasef8cfff6384f62259baea531c7f58bc7040f8dd92
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/11094#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F11094
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/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%2Fmatplotlib%2Fmatplotlib%2Fissues%2F11094
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=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/11094
Reloadhttps://github.com/matplotlib/matplotlib/issues/11094
Reloadhttps://github.com/matplotlib/matplotlib/issues/11094
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/11094
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/11094
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 408 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
cannot use GUI backends inside django request handlershttps://github.com/matplotlib/matplotlib/issues/11094#top
https://github.com/SimonOsipov
SimonOsipovhttps://github.com/SimonOsipov
on Apr 20, 2018https://github.com/matplotlib/matplotlib/issues/11094#issue-316339179
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.