KennthShang / HostG

Graph convolutional neural network for host prediction
19 stars 2 forks source link

invalid literal for int() with base 8 #8

Closed wfgui closed 2 years ago

wfgui commented 2 years ago

I had some problems when run my command:

python run_Speed_up.py --contigs test_contigs.fa --len 8000 --t 0

error:

folder input exist... cleaning dictionary
folder pred exist... cleaning dictionary
folder Split_files exist... cleaning dictionary
folder tmp_pred exist... cleaning dictionary
folder Cyber_data/ exist... cleaning dictionary
Capturing compressed features
Running with cpu
Traceback (most recent call last):
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 187, in nti
    n = int(s.strip() or "0", 8)
ValueError: invalid literal for int() with base 8: 'r_v2\nq\x03('

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 2289, in next
    tarinfo = self.tarinfo.fromtarfile(self)
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 1095, in fromtarfile
    obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors)
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 1037, in frombuf
    chksum = nti(buf[148:156])
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 189, in nti
    raise InvalidHeaderError("invalid header")
tarfile.InvalidHeaderError: invalid header

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/site-packages/torch/serialization.py", line 556, in _load
    return legacy_load(f)
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/site-packages/torch/serialization.py", line 467, in legacy_load
    with closing(tarfile.open(fileobj=f, mode='r:', format=tarfile.PAX_FORMAT)) as tar, \
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 1593, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 1623, in taropen
    return cls(name, mode, fileobj, **kwargs)
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 1486, in __init__
    self.firstmember = self.next()
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/tarfile.py", line 2301, in next
    raise ReadError(str(e))
tarfile.ReadError: invalid header

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "run_CNN.py", line 101, in <module>
    pretrained_dict=torch.load(args.classifier, map_location='cpu')
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/site-packages/torch/serialization.py", line 387, in load
    return _load(f, map_location, pickle_module, **pickle_load_args)
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/site-packages/torch/serialization.py", line 560, in _load
    raise RuntimeError("{} is a zip archive (did you mean to use torch.jit.load()?)".format(f.name))
RuntimeError: Params.pkl is a zip archive (did you mean to use torch.jit.load()?)
Pre-trained CNN Error for file contig_0
cat: pred/*: No such file or directory
Traceback (most recent call last):
  File "run_Speed_up.py", line 157, in <module>
    out = subprocess.check_call(cmd, shell=True)
  File "/home/wfugui/.conda/envs/Host/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cat pred/* > final_prediction.csv' returned non-zero exit status 1.

I don't know what happened. Thanks!

KennthShang commented 2 years ago

Hi,

You can refer to issue #1 to solve this problem.

Best, Jiayu