Title: Importing qt_compat when no Qt binding is installed fails with NameError instead of ImportError · Issue #11629 · matplotlib/matplotlib · GitHub
Open Graph Title: Importing qt_compat when no Qt binding is installed fails with NameError instead of ImportError · Issue #11629 · matplotlib/matplotlib
X Title: Importing qt_compat when no Qt binding is installed fails with NameError instead of ImportError · Issue #11629 · matplotlib/matplotlib
Description: Bug report Bug summary See title. Code for reproduction In a clean venv with matplotlib (HEAD) installed and no qt binding installed, import matplotlib.backends.qt_compat. Actual outcome Traceback (most recent call last): File "
Open Graph Description: Bug report Bug summary See title. Code for reproduction In a clean venv with matplotlib (HEAD) installed and no qt binding installed, import matplotlib.backends.qt_compat. Actual outcome Traceback ...
X Description: Bug report Bug summary See title. Code for reproduction In a clean venv with matplotlib (HEAD) installed and no qt binding installed, import matplotlib.backends.qt_compat. Actual outcome Traceback ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/11629
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Importing qt_compat when no Qt binding is installed fails with NameError instead of ImportError","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nSee title.\r\n\r\n**Code for reproduction**\r\n\r\nIn a clean venv with matplotlib (HEAD) installed and no qt binding installed, import `matplotlib.backends.qt_compat`.\r\n\r\n**Actual outcome**\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"\u003cstring\u003e\", line 1, in \u003cmodule\u003e\r\n File \"/home/antony/src/extern/matplotlib/lib/matplotlib/backends/qt_compat.py\", line 197, in \u003cmodule\u003e\r\n QtCore.Signal = QtCore.pyqtSignal\r\nNameError: name 'QtCore' is not defined\r\n```\r\n\r\n**Expected outcome**\r\n\r\nAn ImportError.\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system:\r\n * Matplotlib version: master\r\n * Matplotlib backend (`print(matplotlib.get_backend())`):\r\n * Python version:\r\n * Jupyter version (if applicable):\r\n * Other libraries: \r\n\r\n---\r\n\r\nIntroduced by #11500 (I think).\r\n#9993 fixes the issue and is ready to go.","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2018-07-11T09:16:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/11629/matplotlib/issues/11629"}
| 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:cca8382b-81ea-4b50-3dd0-5add59674854 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8DC:3C1A41:44EB78:5D3619:6A555356 |
| html-safe-nonce | 0b5ace075faa3f019a20aff4e7b99372f8d60b2cefa78524796e56779d08db52 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOERDOjNDMUE0MTo0NEVCNzg6NUQzNjE5OjZBNTU1MzU2IiwidmlzaXRvcl9pZCI6IjMyMjk3MDg5ODMzODEzNDkyMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | eb80801d2c5ca5e08dc3d35265de38d5f15b652be984da073784f0116e5537b5 |
| hovercard-subject-tag | issue:340158152 |
| 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/11629/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a017e8c0b5af3435bf28dd1427bd8f641a1c678c8e01a6ca17696c059c343b81/matplotlib/matplotlib/issues/11629 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a017e8c0b5af3435bf28dd1427bd8f641a1c678c8e01a6ca17696c059c343b81/matplotlib/matplotlib/issues/11629 |
| og:image:alt | Bug report Bug summary See title. Code for reproduction In a clean venv with matplotlib (HEAD) installed and no qt binding installed, import matplotlib.backends.qt_compat. Actual outcome Traceback ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | cd9eea424140838b22e9eabd53d92b5702617ddd6d76efcd3a37f08d44309ca5 |
| 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 | 3084b9f587e8f1e19803bbe0c77ac77ce3c99c5c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width