pre-commit: Unknown Encoding error
I get the following error on commit
An unexpected error has occurred: LookupError: unknown encoding:
Traceback (most recent call last):
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/error_handler.py", line 47, in error_handler
yield
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/main.py", line 195, in main
return run(runner, args)
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/commands/run.py", line 210, in run
repo_hooks = list(get_repo_hooks(runner))
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/commands/run.py", line 159, in get_repo_hooks
for repo in runner.repositories:
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/cached_property.py", line 26, in __get__
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/runner.py", line 46, in repositories
repository.require_installed()
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/repository.py", line 174, in require_installed
_install_all(self._venvs, self.repo_config['repo'])
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/repository.py", line 68, in _install_all
for cmd_runner, language_name, version, deps in venvs
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/repository.py", line 69, in <genexpr>
if not _installed(cmd_runner, language_name, version, deps)
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/repository.py", line 60, in _installed
_read_installed_state(cmd_runner, venv) == _state(additional_deps)
File "/usr/local/Cellar/pre-commit/0.13.2/libexec/lib/python2.7/site-packages/pre_commit/repository.py", line 43, in _read_installed_state
return json.loads(io.open(filename).read())
LookupError: unknown encoding:
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (10 by maintainers)
Commits related to this issue
- Merge pull request #519 from mshawcroft/fix-518 Fix #518, provide --enforce-all option to check_added_large_files — committed to droctothorpe/pre-commit by asottile 4 years ago
I fixed this upstream
Either grab the nightly VS code or wait for the next release 😄
here’s a branch which does this while I try and figure out what’s up: https://github.com/pre-commit/pre-commit/pull/524
I have the same issue with VS Code.