Skip to content
New issue

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

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

Already on GitHub? # to your account

read cfg file error #17

Open
varrella opened this issue Jan 7, 2021 · 3 comments
Open

read cfg file error #17

varrella opened this issue Jan 7, 2021 · 3 comments

Comments

@varrella
Copy link

varrella commented Jan 7, 2021

in utils/config.py ,line 58:
commit = str(subprocess.check_output(["git", "rev-parse", "HEAD"]), 'utf-8').strip()
branch = str(subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip(), 'utf-8').strip()

error like this :
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Traceback (most recent call last):
File "test_crfnet.py", line 117, in
cfg = get_config(args.config)
File "../crfnet/utils/config.py", line 59, in get_config
commit = str(subprocess.check_output(["git", "rev-parse", "HEAD"]), 'utf-8').strip()
File "/home/ZT/anaconda3/envs/Keras-Tensorflow/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/home/ZT/anaconda3/envs/Keras-Tensorflow/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'rev-parse', 'HEAD']' returned non-zero exit status 128.

@ta984ia
Copy link

ta984ia commented Feb 17, 2021

I am facing the same issue. Did you find the solution ?

@varrella
Copy link
Author

varrella commented Feb 17, 2021 via email

@ta984ia
Copy link

ta984ia commented Feb 18, 2021

Thankyou, I was able to solve the git issue by commenting those lines.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants