RelationalGraphLearning icon indicating copy to clipboard operation
RelationalGraphLearning copied to clipboard

git.exc.InvalidGitRepositoryError

Open asialulu opened this issue 4 years ago • 4 comments

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!

asialulu avatar Sep 13 '21 01:09 asialulu

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

ChanganVR avatar Sep 13 '21 18:09 ChanganVR

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

asialulu avatar Sep 14 '21 00:09 asialulu

@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.

ChanganVR avatar Sep 16 '21 15:09 ChanganVR

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

asialulu avatar Sep 16 '21 23:09 asialulu