conda / conda-build

Commands and tools for building conda packages
https://docs.conda.io/projects/conda-build/
Other
382 stars 423 forks source link

Invalid data stream when trying to build SKLL package #254

Closed dan-blanchard closed 9 years ago

dan-blanchard commented 9 years ago

So, it's finally 1.0 release time for SKLL, but when I went to try to build the package, I encountered a strange crash:

$ conda build .
BUILD START: skll-1.0.0-np19py34_0
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:

    https://github.com/conda/conda-build/issues

Include the output of the command 'conda info' in your report.

Traceback (most recent call last):
  File "/Users/dblanchard/anaconda/bin/conda-build", line 5, in <module>
    sys.exit(main())
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/main_build.py", line 110, in main
    args_func(args, p)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/main_build.py", line 312, in args_func
    args.func(args, p)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/main_build.py", line 272, in execute
    build.build(m, verbose=not args.quiet, post=post)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/build.py", line 307, in build
    verbose=verbose)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/build.py", line 221, in create_env
    update_index(config.bldpkgs_dir)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/index.py", line 65, in update_index
    d = read_index_tar(path)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/index.py", line 20, in read_index_tar
    return json.loads(t.extractfile('info/index.json').read().decode('utf-8'))
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 2043, in extractfile
    tarinfo = self.getmember(member)
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 1726, in getmember
    tarinfo = self._getmember(name)
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 2287, in _getmember
    members = self.getmembers()
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 1737, in getmembers
    self._load()        # all members, we first have to
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 2310, in _load
    tarinfo = self.next()
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 2245, in next
    self.fileobj.seek(self.offset)
  File "/Users/dblanchard/anaconda/lib/python3.4/bz2.py", line 439, in seek
    self._read_block(offset, return_data=False)
  File "/Users/dblanchard/anaconda/lib/python3.4/bz2.py", line 254, in _read_block
    while n > 0 and self._fill_buffer():
  File "/Users/dblanchard/anaconda/lib/python3.4/bz2.py", line 218, in _fill_buffer
    self._buffer = self._decompressor.decompress(rawblock)
OSError: Invalid data stream

The meta.yaml is just:

package:
  name: skll
  version: 1.0.0

source:
  fn: skll-1.0.0.tar.gz
  url: https://pypi.python.org/packages/source/s/skll/skll-1.0.0.tar.gz
  md5: 279951d6f3c16f78f7cdcd1aae108da5

build:
  entry_points:
    - compute_eval_from_predictions = skll.utilities.compute_eval_from_predictions:main
    - filter_features = skll.utilities.filter_features:main
    - generate_predictions = skll.utilities.generate_predictions:main
    - join_features = skll.utilities.join_features:main
    - megam_to_libsvm = skll.utilities.megam_to_libsvm:main
    - print_model_weights = skll.utilities.print_model_weights:main
    - run_experiment = skll.utilities.run_experiment:main
    - skll_convert = skll.utilities.skll_convert:main
    - summarize_results = skll.utilities.summarize_results:main
    - compute_eval_from_predictions2 = skll.utilities.compute_eval_from_predictions:main [py2k]
    - filter_features2 = skll.utilities.filter_features:main [py2k]
    - generate_predictions2 = skll.utilities.generate_predictions:main [py2k]
    - join_features2 = skll.utilities.join_features:main [py2k]
    - megam_to_libsvm2 = skll.utilities.megam_to_libsvm:main [py2k]
    - print_model_weights2 = skll.utilities.print_model_weights:main [py2k]
    - run_experiment2 = skll.utilities.run_experiment:main [py2k]
    - skll_convert2 = skll.utilities.skll_convert:main [py2k]
    - summarize_results2 = skll.utilities.summarize_results:main [py2k]
    - compute_eval_from_predictions3 = skll.utilities.compute_eval_from_predictions:main [py3k]
    - filter_features3 = skll.utilities.filter_features:main [py3k]
    - generate_predictions3 = skll.utilities.generate_predictions:main [py3k]
    - join_features3 = skll.utilities.join_features:main [py3k]
    - megam_to_libsvm3 = skll.utilities.megam_to_libsvm:main [py3k]
    - print_model_weights3 = skll.utilities.print_model_weights:main [py3k]
    - run_experiment3 = skll.utilities.run_experiment:main [py3k]
    - skll_convert3 = skll.utilities.skll_convert:main [py3k]
    - summarize_results3 = skll.utilities.summarize_results:main [py3k]
  number: 0

requirements:
  build:
    - python
    - joblib
    - setuptools
    - scikit-learn
    - six
    - prettytable
    - beautiful-soup
    - numpy
    - scipy
    - configparser [py2k]
    - futures [py2k]
    - logutils [py2k]
    - mock [py2k]

  run:
    - python
    - joblib
    - scikit-learn
    - six
    - prettytable
    - beautiful-soup
    - numpy
    - scipy
    - configparser [py2k]
    - futures [py2k]
    - logutils [py2k]

test:
  # Python imports
  imports:
    - skll
    - skll.data
    - skll.utilities

  commands:
    - compute_eval_from_predictions --help
    - filter_features --help
    - generate_predictions --help
    - join_features --help
    - megam_to_libsvm --help
    - print_model_weights --help
    - run_experiment --help
    - skll_convert --help
    - summarize_results --help

about:
  home: http://github.com/EducationalTestingService/skll
  license: BSD 3-clause

Any idea what could cause this?

asmeurer commented 9 years ago

What is your conda info?

asmeurer commented 9 years ago

Try conda clean -i.

dan-blanchard commented 9 years ago

Sorry for never getting back to you about this. Previously I've had this go away when running conda clean like you suggested.

However, now I'm seeing it when trying to build a package for Apache Zookeeper (after a build was aborted with CTRL-C):

BUILD START: apache-zookeeper-3.4.6-0
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:

    https://github.com/conda/conda-build/issues

Include the output of the command 'conda info' in your report.

Traceback (most recent call last):
  File "/Users/dblanchard/anaconda/bin/conda-build", line 5, in <module>
    sys.exit(main())
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/main_build.py", line 110, in main
    args_func(args, p)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/main_build.py", line 312, in args_func
    args.func(args, p)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/main_build.py", line 272, in execute
    build.build(m, verbose=not args.quiet, post=post)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/build.py", line 338, in build
    verbose=verbose)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/build.py", line 252, in create_env
    update_index(config.bldpkgs_dir)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/index.py", line 65, in update_index
    d = read_index_tar(path)
  File "/Users/dblanchard/anaconda/lib/python3.4/site-packages/conda_build/index.py", line 20, in read_index_tar
    return json.loads(t.extractfile('info/index.json').read().decode('utf-8'))
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 2043, in extractfile
    tarinfo = self.getmember(member)
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 1726, in getmember
    tarinfo = self._getmember(name)
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 2287, in _getmember
    members = self.getmembers()
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 1737, in getmembers
    self._load()        # all members, we first have to
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 2310, in _load
    tarinfo = self.next()
  File "/Users/dblanchard/anaconda/lib/python3.4/tarfile.py", line 2245, in next
    self.fileobj.seek(self.offset)
  File "/Users/dblanchard/anaconda/lib/python3.4/bz2.py", line 439, in seek
    self._read_block(offset, return_data=False)
  File "/Users/dblanchard/anaconda/lib/python3.4/bz2.py", line 254, in _read_block
    while n > 0 and self._fill_buffer():
  File "/Users/dblanchard/anaconda/lib/python3.4/bz2.py", line 218, in _fill_buffer
    self._buffer = self._decompressor.decompress(rawblock)
OSError: Invalid data stream

conda info:

Current conda install:

             platform : osx-64
        conda version : 3.9.1
  conda-build version : 1.10.2
       python version : 3.4.2.final.0
     requests version : 2.5.3
     root environment : /Users/dblanchard/anaconda  (writable)
  default environment : /Users/dblanchard/anaconda
     envs directories : /Users/dblanchard/anaconda/envs
        package cache : /Users/dblanchard/anaconda/pkgs
         channel URLs : http://nlp.research.ets.org/~dblanchard/conda/osx-64/
                        http://nlp.research.ets.org/~dblanchard/conda/noarch/
                        http://repo.continuum.io/pkgs/free/osx-64/
                        http://repo.continuum.io/pkgs/free/noarch/
                        http://repo.continuum.io/pkgs/pro/osx-64/
                        http://repo.continuum.io/pkgs/pro/noarch/
          config file : /Users/dblanchard/.condarc
    is foreign system : False
dan-blanchard commented 9 years ago

I should mention that this time I ran:

conda clean -s -l -i -t -p

and it didn't help.

dan-blanchard commented 9 years ago

Aha! I figured it out! There was a broken tarball in ~/anaconda/conda-bld/osx-64 from when I hit CTRL-C on that previous build. It seems that the only way to get rid of it is by running rm manually. It'd be nice if one of the conda clean commands got rid of packages in ~/anaconda/conda-bld/osx-64.

asmeurer commented 9 years ago

There is a commit that catches OSError that will give a better error message in the next version of conda-build.

I don't want to add a clean command for conda-bld/osx-64 because that's generally something you don't want to clean (it's not a cache or anything).

github-actions[bot] commented 2 years ago

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!