René's URL Explorer Experiment


Title: BUG: TypeError in plt.savefig using cairo backend · Issue #12806 · matplotlib/matplotlib · GitHub

Open Graph Title: BUG: TypeError in plt.savefig using cairo backend · Issue #12806 · matplotlib/matplotlib

X Title: BUG: TypeError in plt.savefig using cairo backend · Issue #12806 · matplotlib/matplotlib

Description: Saving a figure with plt.savefig in svg file format using the cairo backend results in a TypeError. The Traceback is: File "/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/util/plot.py", line 814...

Open Graph Description: Saving a figure with plt.savefig in svg file format using the cairo backend results in a TypeError. The Traceback is: File "/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3...

X Description: Saving a figure with plt.savefig in svg file format using the cairo backend results in a TypeError. The Traceback is: File "/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/py...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BUG: TypeError in plt.savefig using cairo backend","articleBody":"Saving a figure with `plt.savefig` in `svg` file format using the `cairo` backend results in a `TypeError`. The Traceback is:\r\n\r\n```\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/util/plot.py\", line 814, in save_and_close_fig\r\n    plt.savefig('plot.svg', transparent=True, dpi=800)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/pyplot.py\", line 689, in savefig\r\n    res = fig.savefig(*args, **kwargs)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/figure.py\", line 2094, in savefig\r\n    self.canvas.print_figure(fname, **kwargs)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/backend_bases.py\", line 2075, in print_figure\r\n    **kwargs)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/backends/backend_cairo.py\", line 569, in print_svg\r\n    return self._save(fobj, 'svg', *args, **kwargs)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/backends/backend_cairo.py\", line 622, in _save\r\n    self.figure.draw(renderer)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/artist.py\", line 50, in draw_wrapper\r\n    return draw(artist, renderer, *args, **kwargs)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/figure.py\", line 1649, in draw\r\n    renderer, self, artists, self.suppressComposite)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/image.py\", line 138, in _draw_list_compositing_images\r\n    a.draw(renderer)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/artist.py\", line 50, in draw_wrapper\r\n    return draw(artist, renderer, *args, **kwargs)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/axes/_base.py\", line 2628, in draw\r\n    mimage._draw_list_compositing_images(renderer, self, artists)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/image.py\", line 138, in _draw_list_compositing_images\r\n    a.draw(renderer)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/artist.py\", line 50, in draw_wrapper\r\n    return draw(artist, renderer, *args, **kwargs)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/axis.py\", line 1185, in draw\r\n    ticks_to_draw = self._update_ticks(renderer)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/axis.py\", line 1023, in _update_ticks\r\n    tick_tups = list(self.iter_ticks())  # iter_ticks calls the locator\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/axis.py\", line 967, in iter_ticks\r\n    majorLocs = self.major.locator()\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/ticker.py\", line 2128, in __call__\r\n    return self.tick_values(vmin, vmax)\r\n  File \"/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/ticker.py\", line 2189, in tick_values\r\n    have_subs = len(subs) \u003e 1 or (len(subs == 1) and subs[0] != 1.0)\r\nTypeError: len() of unsized object\r\nUncaught exception. Entering post mortem debugging\r\nRunning 'cont' or 'step' will restart the program\r\n\u003e /sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3.7/site-packages/matplotlib/ticker.py(2189)tick_values()\r\n-\u003e have_subs = len(subs) \u003e 1 or (len(subs == 1) and subs[0] != 1.0)\r\n(Pdb) subs\r\narray(100.)\r\n(Pdb) subs.ndim\r\n0\r\n\r\n```\r\n\r\nMaybe `subs` should be converted to a one dimensional array first.\r\n\r\nThe versions of the related programs are:\r\n```\r\nmatplotlib                3.0.2            py37h8a2030e_1    conda-forge\r\nmatplotlib-base           3.0.2            py37h20b835b_1    conda-forge\r\ncairo                     1.14.12              h276e583_5    conda-forge\r\npycairo                   1.18.0           py37h4d1f301_0    conda-forge\r\npython                    3.7.1                h5001a0f_0    conda-forge\r\n```\r\n\r\nThe bug occurred at several plots. However, the creation of the plots is rather complex. Thus I have no minimal example that reproduces the bug for now. If this is necessary, however, I can try to construct one.\r\n","author":{"url":"https://github.com/jor-","@type":"Person","name":"jor-"},"datePublished":"2018-11-14T10:15:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/12806/matplotlib/issues/12806"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:758d876f-8d0e-2a0a-f943-f93b0db65dae
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA00E:35AF44:53802FE:7491BF3:6A550E11
html-safe-nonceff0c012a0fdc9045c3921cda36098965314e1911be090c53b62696c8e557fc0d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDBFOjM1QUY0NDo1MzgwMkZFOjc0OTFCRjM6NkE1NTBFMTEiLCJ2aXNpdG9yX2lkIjoiNTkwMTQwODI1OTAzNDkxMDIyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf06f7314f93d786ca8a03e457afc23cad9b653d90484b313ecaae8487c8893c6
hovercard-subject-tagissue:380626630
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/12806/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dcfd61fc47a817558e844f4f4bf06f9229cafa2373ed65b262ccab77c4ff1f82/matplotlib/matplotlib/issues/12806
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dcfd61fc47a817558e844f4f4bf06f9229cafa2373ed65b262ccab77c4ff1f82/matplotlib/matplotlib/issues/12806
og:image:altSaving a figure with plt.savefig in svg file format using the cairo backend results in a TypeError. The Traceback is: File "/sfs/fs5/home-sh/sunip229/opt/miniconda3/envs/py37_forge_jore/lib/python3...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejor-
hostnamegithub.com
expected-hostnamegithub.com
None682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5
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
release0f2adbaa4b43ea302b02981f637a782ae92ed6dc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/12806#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F12806
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%2F12806
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/12806
Reloadhttps://github.com/matplotlib/matplotlib/issues/12806
Reloadhttps://github.com/matplotlib/matplotlib/issues/12806
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/12806
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/12806
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: TypeError in plt.savefig using cairo backendhttps://github.com/matplotlib/matplotlib/issues/12806#top
https://github.com/jor-
jor-https://github.com/jor-
on Nov 14, 2018https://github.com/matplotlib/matplotlib/issues/12806#issue-380626630
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.