René's URL Explorer Experiment


Title: Issue · GitHub

Open Graph Title: Issue · matplotlib/matplotlib

X Title: Issue · matplotlib/matplotlib

Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.

Open Graph Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.

X Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: fig.savefig broken with Python 3.13.0?","articleBody":"### Bug summary\n\nAfter upgrading from Python 3.9 to Python 3.13.0 on Windows x64 platform working python app that uses matplotlib is unable to save PNG images. Issue is related to Pillow it seems. \n\n### Code for reproduction\n\n```Python\nGenerate typical matplotlib example plot, and try to save it in PNG.\nIt crashes for me on line:\n\nfig.savefig(\"test_filename.png\", facecolor=fig.get_facecolor(), transparent=False)\n```\n\n### Actual outcome\n\nCrash log:\n\n```\nTraceback (most recent call last):\n  File \"C:\\Python313\\Lib\\site-packages\\PIL\\ImageFile.py\", line 554, in _save\n    fh = fp.fileno()\n         ^^^^^^^^^\nAttributeError: '_idat' object has no attribute 'fileno'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"C:\\Python313\\Lib\\site-packages\\PIL\\Image.py\", line 2596, in save\n    save_handler(self, fp, filename)\n    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\PIL\\PngImagePlugin.py\", line 1488, in _save\n    ImageFile._save(\n    ~~~~~~~~~~~~~~~^\n        single_im,\n        ^^^^^^^^^^\n        cast(IO[bytes], _idat(fp, chunk)),\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        [ImageFile._Tile(\"zip\", (0, 0) + single_im.size, 0, rawmode)],\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    )\n    ^\n  File \"C:\\Python313\\Lib\\site-packages\\PIL\\ImageFile.py\", line 558, in _save\n    _encode_tile(im, fp, tile, bufsize, None, exc)\n    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\PIL\\ImageFile.py\", line 585, in _encode_tile\n    fp.write(data)\n    ~~~~~~~~^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\PIL\\PngImagePlugin.py\", line 1132, in write\n    self.chunk(self.fp, b\"IDAT\", data)\n    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\PIL\\PngImagePlugin.py\", line 1119, in putchunk\n    fp.write(byte_data)\n    ~~~~~~~~^^^^^^^^^^^\nOSError: [Errno 9] Bad file descriptor\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"c:\\_repo\\tckit\\tckit_qvr.py\", line 767, in \u003cmodule\u003e\n    fig.savefig(png_fn_small, facecolor=fig.get_facecolor(), transparent=False)\n    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\matplotlib\\figure.py\", line 3490, in savefig\n    self.canvas.print_figure(fname, **kwargs)\n    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\matplotlib\\backend_bases.py\", line 2184, in print_figure\n    result = print_method(\n        filename,\n    ...\u003c3 lines\u003e...\n        bbox_inches_restore=_bbox_inches_restore,\n        **kwargs)\n  File \"C:\\Python313\\Lib\\site-packages\\matplotlib\\backend_bases.py\", line 2040, in \u003clambda\u003e\n    print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(\n                                                                 ~~~~^\n        *args, **{k: v for k, v in kwargs.items() if k not in skip}))\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\matplotlib\\backends\\backend_agg.py\", line 481, in print_png\n    self._print_pil(filename_or_obj, \"png\", pil_kwargs, metadata)\n    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\matplotlib\\backends\\backend_agg.py\", line 430, in _print_pil\n    mpl.image.imsave(\n    ~~~~~~~~~~~~~~~~^\n        filename_or_obj, self.buffer_rgba(), format=fmt, origin=\"upper\",\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        dpi=self.figure.dpi, metadata=metadata, pil_kwargs=pil_kwargs)\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\matplotlib\\image.py\", line 1634, in imsave\n    image.save(fname, **pil_kwargs)\n    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python313\\Lib\\site-packages\\PIL\\Image.py\", line 2599, in save\n    fp.close()\n    ~~~~~~~~^^\nOSError: [Errno 9] Bad file descriptor\n```\n\n### Expected outcome\n\nOlder Python 3.9 renders and saves PNG image normally without any issues, using same code.\n\n### Additional information\n\nMy test environment, installed using latest pip.\n\n```\n\u003epip freeze\ncolorama==0.4.6\ncontourpy==1.3.1\ncycler==0.12.1\nfonttools==4.55.3\nkiwisolver==1.4.8\nmatplotlib==3.10.0\nnumpy==2.2.1\npackaging==24.2\npandas==2.2.3\npillow==11.1.0\npyparsing==3.2.1\npython-dateutil==2.9.0.post0\npython-vxi11==0.9\npytz==2024.2\nscipy==1.15.1\nsix==1.17.0\nstandard-xdrlib==3.13.0\ntzdata==2024.2\n```\n\n### Operating system\n\nWindows 10\n\n### Matplotlib Version\n\n3.10.0\n\n### Matplotlib Backend\n\ntkagg\n\n### Python version\n\n3.13.0\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/tin-","@type":"Person","name":"tin-"},"datePublished":"2025-01-14T21:34:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/29472/matplotlib/issues/29472"}

route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:239ba167-708b-9f87-4e8b-31a805c050b2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB978:1F62C5:5F270C:8149AF:6A51EBBA
html-safe-nonce847ad7c7553d43ab5eb4bb122131857d051e215f224a41de521dbe074f911d27
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTc4OjFGNjJDNTo1RjI3MEM6ODE0OUFGOjZBNTFFQkJBIiwidmlzaXRvcl9pZCI6IjQzMjUyNjEwMTIwODc0NjY5MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfdbafd0651fc52028332983b758c56a35af17ff741ed5869de4639aae81e8a03
hovercard-subject-tagrepository:1385122
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/issues/29472
twitter:imagehttps://opengraph.githubassets.com/9261bf81ff8848b426c0823e67448cf51d35b63d999294ff18880398e6b5b195/matplotlib/matplotlib
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9261bf81ff8848b426c0823e67448cf51d35b63d999294ff18880398e6b5b195/matplotlib/matplotlib
og:image:altmatplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-cache
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
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/29472#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F29472
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%2F29472
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%2Fissues%2Fshow&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/29472
Reloadhttps://github.com/matplotlib/matplotlib/issues/29472
Reloadhttps://github.com/matplotlib/matplotlib/issues/29472
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/29472
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/29472
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 409 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
[Bug]: fig.savefig broken with Python 3.13.0?https://github.com/matplotlib/matplotlib/issues/29472#top
https://github.com/tin-
tin-https://github.com/tin-
on Jan 14, 2025https://github.com/matplotlib/matplotlib/issues/29472#issue-2788321347
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.