Title: Tkinter Canvas.coords does not flatten arguments · Issue #94473 · python/cpython · GitHub
Open Graph Title: Tkinter Canvas.coords does not flatten arguments · Issue #94473 · python/cpython
X Title: Tkinter Canvas.coords does not flatten arguments · Issue #94473 · python/cpython
Description: Bug report Double nested arrays in tk.coords will produce errors in tkinter (_tkinter.TclError: wrong # coordinates: expected at least 4, got 2 in this case) import tkinter as tk coords = [[100, 100], [300, 300]] root = tk.Tk() canvas = ...
Open Graph Description: Bug report Double nested arrays in tk.coords will produce errors in tkinter (_tkinter.TclError: wrong # coordinates: expected at least 4, got 2 in this case) import tkinter as tk coords = [[100, 10...
X Description: Bug report Double nested arrays in tk.coords will produce errors in tkinter (_tkinter.TclError: wrong # coordinates: expected at least 4, got 2 in this case) import tkinter as tk coords = [[100, 10...
Opengraph URL: https://github.com/python/cpython/issues/94473
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tkinter Canvas.coords does not flatten arguments","articleBody":"**Bug report**\r\nDouble nested arrays in tk.coords will produce errors in tkinter (`_tkinter.TclError: wrong # coordinates: expected at least 4, got 2` in this case)\r\n```py\r\nimport tkinter as tk\r\n\r\ncoords = [[100, 100], [300, 300]]\r\n\r\n\r\nroot = tk.Tk()\r\ncanvas = tk.Canvas(width=400,\r\n height=400,\r\n background=\"bisque\")\r\ncanvas.pack(fill=\"both\", expand=True)\r\nline = canvas.create_line(coords)\r\ncoords[1] = [200, 200]\r\ncanvas.coords(line, coords) # line with error\r\n\r\nroot.mainloop()\r\n\r\n```\r\n\r\n**Your environment**\r\n\r\n- CPython versions tested on: 3.10.4\r\n- Operating system: Windows 10\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-98479\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Why-not-now","@type":"Person","name":"Why-not-now"},"datePublished":"2022-07-01T06:17:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/94473/cpython/issues/94473"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ae457ba-1134-1eae-ee30-03387865161e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8588:9D4F4:7B428A:A82A56:6969DBED |
| html-safe-nonce | 20a6194ba40de9c40bd0481f30ff59329b904b5e66837055b5af8f825b0431d5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTg4OjlENEY0OjdCNDI4QTpBODJBNTY6Njk2OURCRUQiLCJ2aXNpdG9yX2lkIjoiMjgwMTUyODI0MzM2NzM1MjEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bf5bcc62a945144e7c54d06f2b929a1d6314efd9b74f19de9e69708c71da94bd |
| hovercard-subject-tag | issue:1290963222 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/94473/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e90e9fd72e0727a5dc9f6ff7b90f13e2541bae0e4a8e27be217ea17d03d75e11/python/cpython/issues/94473 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e90e9fd72e0727a5dc9f6ff7b90f13e2541bae0e4a8e27be217ea17d03d75e11/python/cpython/issues/94473 |
| og:image:alt | Bug report Double nested arrays in tk.coords will produce errors in tkinter (_tkinter.TclError: wrong # coordinates: expected at least 4, got 2 in this case) import tkinter as tk coords = [[100, 10... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Why-not-now |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width