Title: ModuleNotFoundError: toml with 'black' hook · Issue #863 · pre-commit/pre-commit · GitHub
Open Graph Title: ModuleNotFoundError: toml with 'black' hook · Issue #863 · pre-commit/pre-commit
X Title: ModuleNotFoundError: toml with 'black' hook · Issue #863 · pre-commit/pre-commit
Description: I have this config: panman master $ cat .pre-commit-config.yaml repos: - repo: https://github.com/ambv/black rev: stable hooks: - id: black language_version: python3.6 And I've pip-installed the latest pre-commit 1.12.0 to the Python 3.7...
Open Graph Description: I have this config: panman master $ cat .pre-commit-config.yaml repos: - repo: https://github.com/ambv/black rev: stable hooks: - id: black language_version: python3.6 And I've pip-installed the la...
X Description: I have this config: panman master $ cat .pre-commit-config.yaml repos: - repo: https://github.com/ambv/black rev: stable hooks: - id: black language_version: python3.6 And I've pip-installed th...
Opengraph URL: https://github.com/pre-commit/pre-commit/issues/863
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ModuleNotFoundError: toml with 'black' hook","articleBody":"I have this config:\r\n\r\n```\r\npanman master $ cat .pre-commit-config.yaml\r\nrepos:\r\n- repo: https://github.com/ambv/black\r\n rev: stable\r\n hooks:\r\n - id: black\r\n language_version: python3.6\r\n```\r\n\r\nAnd I've pip-installed the latest pre-commit 1.12.0 to the Python 3.7.1 environment, but when I run pre-commit, it fails thus:\r\n\r\n```\r\npanman master $ pre-commit run --all-files\r\nblack....................................................................Failed\r\nhookid: black\r\n\r\nTraceback (most recent call last):\r\n File \"/Users/jaraco/.cache/pre-commit/repoogmwxpko/py_env-python3.6/bin/black\", line 7, in \u003cmodule\u003e\r\n from black import main\r\n File \"/Users/jaraco/.cache/pre-commit/repoogmwxpko/py_env-python3.6/lib/python3.6/site-packages/black.py\", line 41, in \u003cmodule\u003e\r\n import toml\r\nModuleNotFoundError: No module named 'toml'\r\nTraceback (most recent call last):\r\n File \"/Users/jaraco/.cache/pre-commit/repoogmwxpko/py_env-python3.6/bin/black\", line 7, in \u003cmodule\u003e\r\n from black import main\r\n File \"/Users/jaraco/.cache/pre-commit/repoogmwxpko/py_env-python3.6/lib/python3.6/site-packages/black.py\", line 41, in \u003cmodule\u003e\r\n import toml\r\nModuleNotFoundError: No module named 'toml'\r\nTraceback (most recent call last):\r\n File \"/Users/jaraco/.cache/pre-commit/repoogmwxpko/py_env-python3.6/bin/black\", line 7, in \u003cmodule\u003e\r\n from black import main\r\n File \"/Users/jaraco/.cache/pre-commit/repoogmwxpko/py_env-python3.6/lib/python3.6/site-packages/black.py\", line 41, in \u003cmodule\u003e\r\n import toml\r\nModuleNotFoundError: No module named 'toml'\r\nTraceback (most recent call last):\r\n File \"/Users/jaraco/.cache/pre-commit/repoogmwxpko/py_env-python3.6/bin/black\", line 7, in \u003cmodule\u003e\r\n from black import main\r\n File \"/Users/jaraco/.cache/pre-commit/repoogmwxpko/py_env-python3.6/lib/python3.6/site-packages/black.py\", line 41, in \u003cmodule\u003e\r\n import toml\r\nModuleNotFoundError: No module named 'toml'\r\n```\r\n\r\nWhat am I doing wrong?","author":{"url":"https://github.com/jaraco","@type":"Person","name":"jaraco"},"datePublished":"2018-11-09T17:25:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/863/pre-commit/issues/863"}
| 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:e05f4686-6659-0b74-0091-9ab720b25ab8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C07C:17AD18:6390D2:89264B:6A55A26F |
| html-safe-nonce | 6d45160f1ec8a109b96d433320b65861208e6be4ae15a5b2aa9afa1a8151d0c4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDdDOjE3QUQxODo2MzkwRDI6ODkyNjRCOjZBNTVBMjZGIiwidmlzaXRvcl9pZCI6IjY3MDI2NzAxOTM3NzEyNTg0NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a304dde10fd6d7d1b3988df58a468de47d27b270c49f90f650af693d9ab3282f |
| hovercard-subject-tag | issue:379252143 |
| github-keyboard-shortcuts | repository,issues,commits,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/pre-commit/pre-commit/863/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3d8b3793059270664a2aff1c64aba5d97a9fe241851dc7377cde905403856742/pre-commit/pre-commit/issues/863 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3d8b3793059270664a2aff1c64aba5d97a9fe241851dc7377cde905403856742/pre-commit/pre-commit/issues/863 |
| og:image:alt | I have this config: panman master $ cat .pre-commit-config.yaml repos: - repo: https://github.com/ambv/black rev: stable hooks: - id: black language_version: python3.6 And I've pip-installed the la... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jaraco |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/pre-commit/pre-commit git https://github.com/pre-commit/pre-commit.git |
| octolytics-dimension-user_id | 6943086 |
| octolytics-dimension-user_login | pre-commit |
| octolytics-dimension-repository_id | 17689377 |
| octolytics-dimension-repository_nwo | pre-commit/pre-commit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17689377 |
| octolytics-dimension-repository_network_root_nwo | pre-commit/pre-commit |
| 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 | 653fccf1e27344851c0d3de3fa6faa526197f072 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width