Title: key_press_handler(): NameError: global name 'self' is not defined · Issue #918 · matplotlib/matplotlib · GitHub
Open Graph Title: key_press_handler(): NameError: global name 'self' is not defined · Issue #918 · matplotlib/matplotlib
X Title: key_press_handler(): NameError: global name 'self' is not defined · Issue #918 · matplotlib/matplotlib
Description: Hitting the 'f' key on a figure raises this error: In [2]: Traceback (most recent call last): File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py", line 238, in keyPressEvent FigureCanvasBase.key_press_event( self, ...
Open Graph Description: Hitting the 'f' key on a figure raises this error: In [2]: Traceback (most recent call last): File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py", line 238, in keyPressEvent ...
X Description: Hitting the 'f' key on a figure raises this error: In [2]: Traceback (most recent call last): File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py", line 238,...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/918
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"key_press_handler(): NameError: global name 'self' is not defined","articleBody":"Hitting the 'f' key on a figure raises this error:\n\n```\nIn [2]: Traceback (most recent call last):\n File \"/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py\", line 238, in keyPressEvent\n FigureCanvasBase.key_press_event( self, key )\n File \"/home/mspacek/src/matplotlib/lib/matplotlib/backend_bases.py\", line 1608, in key_press_event\n self.callbacks.process(s, event)\n File \"/home/mspacek/src/matplotlib/lib/matplotlib/cbook.py\", line 312, in process\n proxy(*args, **kwargs)\n File \"/home/mspacek/src/matplotlib/lib/matplotlib/cbook.py\", line 239, in __call__\n return mtd(*args, **kwargs)\n File \"/home/mspacek/src/matplotlib/lib/matplotlib/backend_bases.py\", line 2418, in key_press\n key_press_handler(event, self.canvas, self.canvas.toolbar)\n File \"/home/mspacek/src/matplotlib/lib/matplotlib/backend_bases.py\", line 2315, in key_press_handler\n self.full_screen_toggle()\nNameError: global name 'self' is not defined\n```\n\n`self` should probably be `canvas.manager`.\n","author":{"url":"https://github.com/mspacek","@type":"Person","name":"mspacek"},"datePublished":"2012-06-04T10:38:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/918/matplotlib/issues/918"}
| 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:1312ecdc-1a86-136e-5abc-f9fa1a110b28 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FBE:269503:4FAE4C:69340A:6A52D75F |
| html-safe-nonce | 7262ca044bdddfde1f1ca15210f5410e006ef466861bb27f8e177fcfca5a921d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkJFOjI2OTUwMzo0RkFFNEM6NjkzNDBBOjZBNTJENzVGIiwidmlzaXRvcl9pZCI6IjgxMzg1MjIzODEyMzkxMTM1NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5af29b1022b6073f9e6e40c0080de1a81305b159d3f7839958d0c73aff8069d7 |
| hovercard-subject-tag | issue:4885746 |
| 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/matplotlib/matplotlib/918/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f81fc187f26da10ccee353566dab501f0bbefd9383eb9987fa2b6d9545a2f8e7/matplotlib/matplotlib/issues/918 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f81fc187f26da10ccee353566dab501f0bbefd9383eb9987fa2b6d9545a2f8e7/matplotlib/matplotlib/issues/918 |
| og:image:alt | Hitting the 'f' key on a figure raises this error: In [2]: Traceback (most recent call last): File "/home/mspacek/src/matplotlib/lib/matplotlib/backends/backend_qt4.py", line 238, in keyPressEvent ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mspacek |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width