You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An unexpected error has occurred: AssertionError: BUG: expected environment for python to be healthy immediately after install, please open an issue describing your environment
more info:
virtualenv python version did not match created version:
- actual version: <<error retrieving version from /home/hadi/.cache/pre-commit/repoaviv15vw/py_env-python3/bin/python>>
- expected version: 3.10.4.final.0
Traceback (most recent call last):
File "/home/***/env/lib/python3.10/site-packages/pre_commit/error_handler.py", line 73, in error_handler
yield
File "/home/***/env/lib/python3.10/site-packages/pre_commit/main.py", line 361, in main
return hook_impl(
File "/home/***/env/lib/python3.10/site-packages/pre_commit/commands/hook_impl.py", line 238, in hook_impl
return retv | run(config, store, ns)
File "/home/***/env/lib/python3.10/site-packages/pre_commit/commands/run.py", line 414, in run
install_hook_envs(to_install, store)
File "/home/***/env/lib/python3.10/site-packages/pre_commit/repository.py", line 223, in install_hook_envs
_hook_install(hook)
File "/home/***/env/lib/python3.10/site-packages/pre_commit/repository.py", line 84, in _hook_install
raise AssertionError(
AssertionError: BUG: expected environment for python to be healthy immediately after install, please open an issue describing your environment
more info:
virtualenv python version did not match created version:
- actual version: <<error retrieving version from /home/***/.cache/pre-commit/repoaviv15vw/py_env-python3/bin/python>>
- expected version: 3.10.4.final.0
Possible Fix
This hot fix fixes the problem for me.
--- languages/python.py 2022-07-04 21:53:03.152943042 +0430+++ languages/python.py 2022-07-04 21:52:59.832929712 +0430@@ -50,6 +50,7 @@
def bin_dir(venv: str) -> str:
"""On windows there's a different directory for the virtualenv"""
bin_part = 'Scripts' if os.name == 'nt' else 'bin'
+ venv = os.path.join(venv, "local")
return os.path.join(venv, bin_part)
The text was updated successfully, but these errors were encountered:
Hook does not work with
venv
andpython
3.10.4.version information
error information
Possible Fix
This hot fix fixes the problem for me.
The text was updated successfully, but these errors were encountered: