ValueError: SHA could not be resolved, git returned: b''

Issue #105 resolved
Former user created an issue

I created a resfile environment but when I run

python3 /home/microviable/Resfinder/lib/python3.10/site-packages/resfinder/run_resfinder.py -o ./ -s "Escherichia coli" -l 0.6 -t 0.8 --acquired --point -ifq data/test_isolate_01_*

I obtain

Traceback (most recent call last): File "/home/microviable/Resfinder/lib/python3.10/site-packages/resfinder/run_resfinder.py", line 568, in <module> sys.exit(main()) File "/home/microviable/Resfinder/lib/python3.10/site-packages/resfinder/run_resfinder.py", line 228, in main std_result.init_database("ResFinder", conf.db_path_res) File "/home/microviable/Resfinder/lib/python3.10/site-packages/cgelib/output/result.py", line 82, in init_database version_in_git, commit = PliersMixin.get_version_commit(db_dir) File "/home/microviable/Resfinder/lib/python3.10/site-packages/cgelib/utils/pliers_mixin.py", line 33, in get_version_commit com2tag[tag.commit.hexsha] = str(tag) File "/home/microviable/Resfinder/lib/python3.10/site-packages/git/refs/tag.py", line 43, in commit obj = self.object File "/home/microviable/Resfinder/lib/python3.10/site-packages/git/refs/tag.py", line 74, in object return Reference._get_object(self) File "/home/microviable/Resfinder/lib/python3.10/site-packages/git/refs/symbolic.py", line 219, in _get_object return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path))) File "/home/microviable/Resfinder/lib/python3.10/site-packages/git/objects/base.py", line 94, in new_from_sha oinfo = repo.odb.info(sha1) File "/home/microviable/Resfinder/lib/python3.10/site-packages/git/db.py", line 40, in info hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha)) File "/home/microviable/Resfinder/lib/python3.10/site-packages/git/cmd.py", line 1383, in get_object_header return self.__get_object_header(cmd, ref) File "/home/microviable/Resfinder/lib/python3.10/site-packages/git/cmd.py", line 1370, in __get_object_header return self._parse_object_header(cmd.stdout.readline()) File "/home/microviable/Resfinder/lib/python3.10/site-packages/git/cmd.py", line 1329, in _parse_object_header raise ValueError("SHA could not be resolved, git returned: %r" % (header_line.strip())) ValueError: SHA could not be resolved, git returned: b''

Comments (4)

  1. Edison Alain von Matt

    Dear User,

    Unfortunately, I am not able to reproduce the issue on my local system.

    However, your ResFinder environment runs on an older Python version (3.10). Thus, I advise you to set up a new environment on a Python version above 3.9.x and try it again.

    Please let me know if this resolves your issue.

    Best regards
    Eddy

  2. Edison Alain von Matt

    Dear User,

    I saw that you posted the issue in another ticket, from which I can see that you already tried to run it with a Python version of 3.9.x.

    Have you already tried to update git?

    pip install GitPython --upgrade

    Best regards

    Eddy

  3. Log in to comment