Skip to content

pre-commit issue in Gitpod #52604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ggold7046 opened this issue Apr 11, 2023 · 3 comments
Closed

pre-commit issue in Gitpod #52604

ggold7046 opened this issue Apr 11, 2023 · 3 comments

Comments

@ggold7046
Copy link
Contributor

ggold7046 commented Apr 11, 2023

Hi Pandas team,

I am facing a problem while running pre-commit install inside Gitpod. This is the error I'm getting while running the pre-commit install command in gitpod.

<summary>Error running pre-commit</summary>
<br>
(pandas-dev) gitpod > /workspace/pandas $ pre-commit install
An unexpected error has occurred: PermissionError: [Errno 13] Permission denied: '/home/gitpod/.cache/pre-commit'
Traceback (most recent call last):
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/site-packages/pre_commit/error_handler.py", line 73, in error_handler
    yield
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/site-packages/pre_commit/main.py", line 340, in main
    store = Store()
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/site-packages/pre_commit/store.py", line 51, in __init__
    os.makedirs(self.directory, exist_ok=True)
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/gitpod/.cache/pre-commit'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gitpod/mambaforge3/envs/pandas-dev/bin/pre-commit", line 11, in <module>
    sys.exit(main())
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/site-packages/pre_commit/main.py", line 405, in main
    raise AssertionError(
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/site-packages/pre_commit/error_handler.py", line 81, in error_handler
    _log_and_exit(msg, ret_code, e, traceback.format_exc())
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/site-packages/pre_commit/error_handler.py", line 31, in _log_and_exit
    storedir = Store().directory
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/site-packages/pre_commit/store.py", line 51, in __init__
    os.makedirs(self.directory, exist_ok=True)
  File "/home/gitpod/mambaforge3/envs/pandas-dev/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/gitpod/.cache/pre-commit'
(pandas-dev) gitpod > /workspace/pandas $ 

Though when I do pip install pre-commit , it says all the requirement are satisfied and no error is shown.

@phofl
Copy link
Member

phofl commented Apr 11, 2023

cc @noatamir do you have time to look into this?

@noatamir
Copy link
Member

Yeah, I was going to update the Gitpod this week, so I will try to resolve this issue as well. I'll mention this issue when I open the PR, so you will be notified when it's resolved.

@noatamir
Copy link
Member

This issue is addressed by #52700 and already fixed in the Gitpod we deployed to dockerhub today.

@phofl phofl closed this as completed Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants