merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
413 stars 142 forks source link

[BUG] tarfile.ReadError: not a gzip file #2205

Open Bill-Branson opened 5 months ago

Bill-Branson commented 5 months ago

Short description of the problem

While installing anvio V8 with "pip install" on a conda environment as per the instructions it fails to gunzip the gz file.

anvi'o version

pip install anvio-8.tar.gz

anvi-self-test --version  ( This fails since it never installs).

System info

CENTOS 7, through conda.

Detailed description of the issue

pip install anvio-8.tar.gz

Processing ./anvio-8.tar.gz ERROR: Exception: Traceback (most recent call last): File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/tarfile.py", line 1877, in gzopen t = cls.taropen(name, mode, fileobj, kwargs) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/tarfile.py", line 1854, in taropen return cls(name, mode, fileobj, kwargs) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/tarfile.py", line 1714, in init self.firstmember = self.next() File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/tarfile.py", line 2629, in next raise e File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/tarfile.py", line 2602, in next tarinfo = self.tarinfo.fromtarfile(self) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/tarfile.py", line 1292, in fromtarfile buf = tarfile.fileobj.read(BLOCKSIZE) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/gzip.py", line 301, in read return self._buffer.read(size) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/_compression.py", line 68, in readinto data = self.read(len(byte_view)) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/gzip.py", line 488, in read if not self._read_gzip_header(): File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/gzip.py", line 436, in _read_gzip_header raise BadGzipFile('Not a gzipped file (%r)' % magic) gzip.BadGzipFile: Not a gzipped file (b'No')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper status = run_func(*args) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper return func(self, options, args) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 377, in run requirement_set = resolver.resolve( File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 76, in resolve collected = self.factory.collect_root_requirements(root_reqs) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 534, in collect_root_requirements reqs = list( File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 490, in _make_requirements_from_install_req cand = self._make_base_candidate_from_link( File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 228, in _make_base_candidate_from_link self._link_candidate_cache[link] = LinkCandidate( File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 293, in init super().init( File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in init self.dist = self._prepare() File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare dist = self._prepare_distribution() File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in _prepare_distribution return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 525, in prepare_linked_requirement return self._prepare_linked_requirement(req, parallel_builds) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 596, in _prepare_linked_requirement local_file = unpack_url( File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 178, in unpack_url unpack_file(file.path, location, file.content_type) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/utils/unpacking.py", line 246, in unpack_file untar_file(filename, location) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/site-packages/pip/_internal/utils/unpacking.py", line 173, in untar_file tar = tarfile.open(filename, mode, encoding="utf-8") File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/tarfile.py", line 1824, in open return func(name, filemode, fileobj, **kwargs) File "/hpc/apps/miniconda3/4.9.2/envs/anvio-8.0.0/lib/python3.10/tarfile.py", line 1881, in gzopen raise ReadError("not a gzip file") from e tarfile.ReadError: not a gzip file

NOTE: I will try and unzip this file and then untar it and then re-tar and re gzip it and see if that might fix it.

########## END ###############

Bill-Branson commented 5 months ago

It might be a corrupted gz file. I will try a few things and see if I can fix it.

Bill

Bill-Branson commented 5 months ago

Problem solved, downloaded the gz file directly to another box. gunziped it. re-gzipped it and moved it to the install platform. NOw it installs with pip install. Please check the one you have at the download site, CURL, was how I grabbed it the failing time and the second time I got it through download on the download page, assets,

https://github.com/merenlab/anvio/releases

top download of the three. There are two source code files and the anvio-8.tar.gz file. Please check them all for validity.

Thanks

Bill

Bill-Branson commented 5 months ago

(anvio-8.0.0) [root@ln01 anvio-8.0.0]# anvi-self-test --version Anvi'o .......................................: marie (v8) Python .......................................: 3.10.13

Profile database .............................: 38 Contigs database .............................: 21 Pan database .................................: 16 Genome data storage ..........................: 7 Auxiliary data storage .......................: 2 Structure database ...........................: 2 Metabolic modules database ...................: 4 tRNA-seq database ............................: 2

(anvio-8.0.0) [root@ln01 anvio-8.0.0]#

SUCCESS!!!!!!!!!!!!!!!!!!!!!!!