Skip to content
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

git.exc.InvalidGitRepositoryError #15

Open
asialulu opened this issue Sep 13, 2021 · 4 comments
Open

git.exc.InvalidGitRepositoryError #15

asialulu opened this issue Sep 13, 2021 · 4 comments

Comments

@asialulu
Copy link

Hi, Chen! I'm interested in your work. However,when I run train.py, the problem occured:
File "train.py", line 255, in <module> main(sys_args) File "train.py", line 79, in main repo = git.Repo(search_parent_directories=True) File "/home/hj/anaconda3/envs/graph/lib/python3.6/site-packages/git/repo/base.py", line 220, in __init__ self.working_dir = self._working_tree_dir or self.common_dir # type: Optional[PathLike] File "/home/hj/anaconda3/envs/graph/lib/python3.6/site-packages/git/repo/base.py", line 303, in common_dir raise InvalidGitRepositoryError() git.exc.InvalidGitRepositoryError

Do you know how to solve it?
Thank you very much!

@ChanganVR
Copy link
Owner

@asialulu under which folder did you run this command? Looks like the directory where you ran the script is not inside a git folder.

@asialulu
Copy link
Author

Sorry, I should tell you I run the python train.py --policy rgl in /crowd_nav/.
The path is /home/hj/two/RelationalGraphLearning/crowd_nav.

The problem is follow:
(graph) hj@hj:~/two/RelationalGraphLearning/crowd_nav$ python train.py --policy rgl Output directory already exists! Overwrite the folder? (y/n)y Traceback (most recent call last): File "train.py", line 255, in <module> main(sys_args) File "train.py", line 79, in main repo = git.Repo(search_parent_directories=True) File "/home/hj/anaconda3/envs/graph/lib/python3.6/site-packages/git/repo/base.py", line 220, in __init__ self.working_dir = self._working_tree_dir or self.common_dir # type: Optional[PathLike] File "/home/hj/anaconda3/envs/graph/lib/python3.6/site-packages/git/repo/base.py", line 303, in common_dir raise InvalidGitRepositoryError() git.exc.InvalidGitRepositoryError

@ChanganVR
Copy link
Owner

@asialulu it works fine for me. How did you download this repo? Did you do git clone or https download? You need to do the former to get things working. To verify, you can run git status under the root directory. If things still don't work, you can just comment out the lines where git is used.

@asialulu
Copy link
Author

Thank you very much. I can do it when I run git status.

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

2 participants