René's URL Explorer Experiment


Title: Tainted canvases may not be exported · Issue #2785 · plotly/plotly.py · GitHub

Open Graph Title: Tainted canvases may not be exported · Issue #2785 · plotly/plotly.py

X Title: Tainted canvases may not be exported · Issue #2785 · plotly/plotly.py

Description: I'm embedding some plotly graphs into a pyqt application using the QWebEngineView. Everything seems to work well except for when I click on the "Download plot as a png" button in the toolbar. I get the error: js: Uncaught SecurityError: ...

Open Graph Description: I'm embedding some plotly graphs into a pyqt application using the QWebEngineView. Everything seems to work well except for when I click on the "Download plot as a png" button in the toolbar. I get...

X Description: I'm embedding some plotly graphs into a pyqt application using the QWebEngineView. Everything seems to work well except for when I click on the "Download plot as a png" button in the ...

Opengraph URL: https://github.com/plotly/plotly.py/issues/2785

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tainted canvases may not be exported","articleBody":"I'm embedding some plotly graphs into a pyqt application using the QWebEngineView.  Everything seems to work well except for when I click on the \"Download plot as a png\" button in the toolbar.  I get the error:\r\n\r\n\u003e js: Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.\r\n\r\nNot sure if this is a bug (it seems like it should work), or a feature request (I'd like to be able to do this).  Maybe there's a way around the error?\r\n\r\n```\r\nimport plotly.offline as po\r\nimport plotly.graph_objs as go\r\nimport plotly.express as px\r\n\r\nfrom PyQt5.QtWebEngineWidgets import QWebEngineView\r\nfrom PyQt5 import QtCore, QtWidgets\r\nimport sys\r\n\r\ndef show_qt(fig):\r\n    raw_html = '\u003chtml\u003e\u003chead\u003e\u003cmeta charset=\"utf-8\" /\u003e'\r\n    raw_html += '\u003cscript src=\"https://cdn.plot.ly/plotly-latest.min.js\"\u003e\u003c/script\u003e\u003c/head\u003e'\r\n    raw_html += '\u003cbody\u003e'\r\n    raw_html += po.plot(fig, include_plotlyjs=False, output_type='div')\r\n    raw_html += '\u003c/body\u003e\u003c/html\u003e'\r\n\r\n    fig_view = QWebEngineView()\r\n    # setHtml has a 2MB size limit, need to switch to setUrl on tmp file\r\n    # for large figures.\r\n    fig_view.setHtml(raw_html)\r\n    fig_view.show()\r\n    fig_view.raise_()\r\n    return fig_view\r\n\r\n\r\nif __name__ == '__main__':\r\n    app = QtWidgets.QApplication(sys.argv)\r\n\r\n    df = px.data.election()\r\n    geojson = px.data.election_geojson()\r\n\r\n    fig = px.choropleth(df, geojson=geojson, color=\"Bergeron\",\r\n                        locations=\"district\", featureidkey=\"properties.district\",\r\n                        projection=\"mercator\"\r\n                        )\r\n    fig.update_geos(fitbounds=\"locations\", visible=False)\r\n    fig.update_layout(margin={\"r\":0,\"t\":0,\"l\":0,\"b\":0})\r\n    fig_view = show_qt(fig)\r\n    sys.exit(app.exec_())\r\n```\r\n","author":{"url":"https://github.com/jwebster-LANL","@type":"Person","name":"jwebster-LANL"},"datePublished":"2020-09-22T18:43:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2785/plotly.py/issues/2785"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d0f6e634-64b2-ef47-49a6-35f65922217d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAE2A:BE119:1C369:2653A:6A57694A
html-safe-nonce54c1da7632806dfad4138d687d3d4b776144bbfa3b29c02417b3190a597b3dae
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTJBOkJFMTE5OjFDMzY5OjI2NTNBOjZBNTc2OTRBIiwidmlzaXRvcl9pZCI6IjMyNzk2NTYzNTYzNjI1NDU0ODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacedf97f1500d926ddbaf9b590069c4bfcbb92b5158722b607ab376d1d54abf162
hovercard-subject-tagissue:706609877
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/plotly/plotly.py/2785/issue_layout
twitter:imagehttps://opengraph.githubassets.com/01fde5d2f29782b5615abc406dd23b71aea28d289f32a3905eb0a4b3442ff88c/plotly/plotly.py/issues/2785
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/01fde5d2f29782b5615abc406dd23b71aea28d289f32a3905eb0a4b3442ff88c/plotly/plotly.py/issues/2785
og:image:altI'm embedding some plotly graphs into a pyqt application using the QWebEngineView. Everything seems to work well except for when I click on the "Download plot as a png" button in the toolbar. I get...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejwebster-LANL
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
turbo-cache-controlno-preview
go-importgithub.com/plotly/plotly.py git https://github.com/plotly/plotly.py.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id14579099
octolytics-dimension-repository_nwoplotly/plotly.py
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14579099
octolytics-dimension-repository_network_root_nwoplotly/plotly.py
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
release1b5a9c55f39dd27607a574cdc272552f20236b44
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/plotly/plotly.py/issues/2785#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.py%2Fissues%2F2785
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%2Fplotly%2Fplotly.py%2Fissues%2F2785
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=plotly%2Fplotly.py
Reloadhttps://github.com/plotly/plotly.py/issues/2785
Reloadhttps://github.com/plotly/plotly.py/issues/2785
Reloadhttps://github.com/plotly/plotly.py/issues/2785
Please reload this pagehttps://github.com/plotly/plotly.py/issues/2785
plotly https://github.com/plotly
plotly.pyhttps://github.com/plotly/plotly.py
Please reload this pagehttps://github.com/plotly/plotly.py/issues/2785
Notifications https://github.com/login?return_to=%2Fplotly%2Fplotly.py
Fork 2.8k https://github.com/login?return_to=%2Fplotly%2Fplotly.py
Star 18.7k https://github.com/login?return_to=%2Fplotly%2Fplotly.py
Code https://github.com/plotly/plotly.py
Issues 721 https://github.com/plotly/plotly.py/issues
Pull requests 54 https://github.com/plotly/plotly.py/pulls
Actions https://github.com/plotly/plotly.py/actions
Security and quality 0 https://github.com/plotly/plotly.py/security
Insights https://github.com/plotly/plotly.py/pulse
Code https://github.com/plotly/plotly.py
Issues https://github.com/plotly/plotly.py/issues
Pull requests https://github.com/plotly/plotly.py/pulls
Actions https://github.com/plotly/plotly.py/actions
Security and quality https://github.com/plotly/plotly.py/security
Insights https://github.com/plotly/plotly.py/pulse
Tainted canvases may not be exportedhttps://github.com/plotly/plotly.py/issues/2785#top
https://github.com/jwebster-LANL
jwebster-LANLhttps://github.com/jwebster-LANL
on Sep 22, 2020https://github.com/plotly/plotly.py/issues/2785#issue-706609877
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.