resfinder error

Issue #95 duplicate
Former user created an issue

python3 run_resfinder.py -ifa /data1/MFDS_analysis/theragen1130/JH1-60/00.spades/contigs.fasta -s "staphylococcus aureus" -l_p 0.6 -t_p 0.95 --acquired --point -o /data1/MFDS_analysis/theragen1130/JH1-60/02.resfinder -k /data1/tools/resfinder/kma/ -db_res /data1/tools/resfinder/resfinder_db -db_point /data1/tools/resfinder/pointfinder_db/ Traceback (most recent call last): File "/data1/tools/anaconda3/lib/python3.9/site-packages/resfinder/run_resfinder.py", line 537, in <module> sys.exit(main()) File "/data1/tools/anaconda3/lib/python3.9/site-packages/resfinder/run_resfinder.py", line 206, in main std_result.init_database("ResFinder", conf.db_path_res) File "/data1/tools/anaconda3/lib/python3.9/site-packages/cgelib/output/result.py", line 82, in init_database version_in_git, commit = PliersMixin.get_version_commit(db_dir) File "/data1/tools/anaconda3/lib/python3.9/site-packages/cgelib/utils/pliers_mixin.py", line 33, in get_version_commit com2tag[tag.commit.hexsha] = str(tag) File "/data1/tools/anaconda3/lib/python3.9/site-packages/git/refs/tag.py", line 43, in commit obj = self.object File "/data1/tools/anaconda3/lib/python3.9/site-packages/git/refs/tag.py", line 69, in object return Reference._get_object(self) File "/data1/tools/anaconda3/lib/python3.9/site-packages/git/refs/symbolic.py", line 210, in _get_object return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path))) File "/data1/tools/anaconda3/lib/python3.9/site-packages/git/objects/base.py", line 85, in new_from_sha oinfo = repo.odb.info(sha1) File "/data1/tools/anaconda3/lib/python3.9/site-packages/git/db.py", line 43, in info hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha)) File "/data1/tools/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 1253, in get_object_header return self.__get_object_header(cmd, ref) File "/data1/tools/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 1240, in __get_object_header return self._parse_object_header(cmd.stdout.readline()) File "/data1/tools/anaconda3/lib/python3.9/site-packages/git/cmd.py", line 1198, 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. CGE Helpdesk

    Dear Mr./Mrs.

    Thank you for your message and for your interest in ResFinder.

    The issue seems to be with Git. Please try to update Git to the latest version. Please let me know if the issue persists.

    best regards,

    Maja, CGE Helpdesk

  2. Ignacio Montero Ordóñez

    python3 run_resfinder.py -o ./ -s "Escherichia coli" -l 0.6 -t 0.8 --acquired --point -ifq data/test_isolate_01_*
    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''

    How to update git?

  3. CGE Helpdesk

    Dear User.

    To update git please run:

    pip install GitPython --upgrade

    Best Regards,

    Maja, CGE Helpdesk

  4. Log in to comment