question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An unexpected error has occurred: AssertionError: BUG: expected environment for python to be healthy() immediately after install, please open an issue describing your environment

See original GitHub issue

describe your issue

An unexpected error has occurred: AssertionError: BUG: expected environment for python to be healthy() immediately after install, please open an issue describing your environment Check the log at /Users/duanjiaxing/.cache/pre-commit/pre-commit.log

pre-commit --version

pre-commit 2.17.0

.pre-commit-config.yaml

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.3.0
    hooks:
      - id: check-yaml
        args: [--allow-multiple-documents]
      - id: end-of-file-fixer
      - id: trailing-whitespace
  - repo: https://github.com/golangci/golangci-lint
    rev: v1.33.0
    hooks:
      - id: golangci-lint

~/.cache/pre-commit/pre-commit.log (if present)

version information

pre-commit version: 2.17.0
git --version: git version 2.30.0
sys.version:
    3.10.2 (main, Feb  2 2022, 06:19:27) [Clang 13.0.0 (clang-1300.0.29.3)]
sys.executable: /usr/local/Cellar/pre-commit/2.17.0/libexec/bin/python3.10
os.name: posix
sys.platform: darwin

error information

An unexpected error has occurred: AssertionError: BUG: expected environment for python to be healthy() immediately after install, please open an issue describing your environment
Traceback (most recent call last):
  File "/usr/local/Cellar/pre-commit/2.17.0/libexec/lib/python3.10/site-packages/pre_commit/error_handler.py", line 70, in error_handler
    yield
  File "/usr/local/Cellar/pre-commit/2.17.0/libexec/lib/python3.10/site-packages/pre_commit/main.py", line 378, in main
    return install(
  File "/usr/local/Cellar/pre-commit/2.17.0/libexec/lib/python3.10/site-packages/pre_commit/commands/install_uninstall.py", line 128, in install
    install_hooks(config_file, store)
  File "/usr/local/Cellar/pre-commit/2.17.0/libexec/lib/python3.10/site-packages/pre_commit/commands/install_uninstall.py", line 134, in install_hooks
    install_hook_envs(all_hooks(load_config(config_file), store), store)
  File "/usr/local/Cellar/pre-commit/2.17.0/libexec/lib/python3.10/site-packages/pre_commit/repository.py", line 224, in install_hook_envs
    _hook_install(hook)
  File "/usr/local/Cellar/pre-commit/2.17.0/libexec/lib/python3.10/site-packages/pre_commit/repository.py", line 86, in _hook_install
    raise AssertionError(
AssertionError: BUG: expected environment for python to be healthy() immediately after install, please open an issue describing your environment

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zhijian-procommented, Mar 8, 2022

@absassi I tried executing python3.10 -m virtualenv vvv with many versions of virtualenv but none got the directory you want. vvv/bin directory does not exist If it’s a virtualenv problem, the previous version should be ok

1reaction
asottilecommented, Mar 4, 2022

you’ve got the wrong commands – you should be able to copy paste the commands and then copy paste their output

screenshots of text are:

  1. unsearchable
  2. inaccessible
Read more comments on GitHub >

github_iconTop Results From Across the Web

Flake 8 - BUG: expected environment for python to be healthy ...
I saw there's an issue #1575 that was fixed recently, however, flake is having the same error.
Read more >
How to solve pre-commit asserttion error on ubuntu 22.04
I have installed a Django project with the cookie-cutter. and now I have got an error when I want to commit my changes....
Read more >
Troubleshooting | Cloud Storage
This page describes troubleshooting methods for common errors you may encounter while using Cloud Storage. See the Google Cloud Status Dashboard for ...
Read more >
python-websockets(1) - Arch manual pages
websockets is a library for building WebSocket servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. Built on...
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/21 06 ...
Bug :128538 - "sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools" status:UNCONFIRMED resolution: severity:enhancement ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found