_pygit2.GitError: Repository not found at

Viewed 160
def save_experiment_config(self):
    with open(os.path.join(self.experiment_dir, 'parameters.txt'), 'w') as file:
        config_dict = vars(self.args)
        for k in vars(self.args):
            file.write(f"{k}={config_dict[k]} \n")
        repo = Repository('.')
        file.write(f"git-repo={repo.head.shorthand} \n")

I run the code,but occur a error "_pygit2.GitError: Repository not found at .",I don't know how can I deal with it?Thank for you help

0 Answers
Related