Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctest with block_reduce has ImportError #8145

Closed
pllim opened this issue Nov 16, 2018 · 8 comments
Closed

doctest with block_reduce has ImportError #8145

pllim opened this issue Nov 16, 2018 · 8 comments

Comments

@pllim
Copy link
Member

pllim commented Nov 16, 2018

This has been reported upstream at scikit-image/scikit-image#3551 . Not sure how best to handle this failure in the meantime.

https://travis-ci.org/astropy/astropy/jobs/455917279

_______________________ [doctest] docs/nddata/index.rst ________________________
323 
324 The functions `~astropy.nddata.block_reduce` and
325 `~astropy.nddata.block_replicate` resize images. The example below reduces the
326 size of the image by a factor of 4. Note that the result is a `numpy.ndarray`;
327 the mask, metadata, etc are discarded:
328 
329 .. doctest-requires:: skimage
330 
331     >>> from astropy.nddata import block_reduce, block_replicate
332     >>> smaller = block_reduce(ccd, 4)
UNEXPECTED EXCEPTION: ImportError("cannot import name '_validate_lengths'",)
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/test/lib/python3.6/doctest.py", line 1330, in __run
    compileflags, 1), test.globs)
  File "<doctest index.rst[61]>", line 1, in <module>
  File "/tmp/astropy-test-rp8r1_8c/lib/python3.6/site-packages/astropy/utils/decorators.py", line 827, in block_reduce
    func = make_function_with_signature(func, name=name, **wrapped_args)
  File "/tmp/astropy-test-rp8r1_8c/lib/python3.6/site-packages/astropy/nddata/decorators.py", line 245, in wrapper
    result = func(data, *args, **kwargs)
  File "/tmp/astropy-test-rp8r1_8c/lib/python3.6/site-packages/astropy/nddata/utils.py", line 370, in block_reduce
    from skimage.measure import block_reduce
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/measure/__init__.py", line 3, in <module>
    from ._marching_cubes_classic import (marching_cubes_classic,
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/measure/_marching_cubes_classic.py", line 3, in <module>
    from .._shared.utils import warn
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/_shared/utils.py", line 10, in <module>
    from ..util import img_as_float
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/util/__init__.py", line 8, in <module>
    from .arraycrop import crop
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/skimage/util/arraycrop.py", line 8, in <module>
    from numpy.lib.arraypad import _validate_lengths
ImportError: cannot import name '_validate_lengths'
/tmp/astropy-test-rp8r1_8c/lib/python3.6/site-packages/docs/nddata/index.rst:332: UnexpectedException
@mwcraig
Copy link
Member

mwcraig commented Dec 4, 2018

Trying out a fix for this at astropy/ccdproc#651 by xfailing some tests...

@pllim
Copy link
Member Author

pllim commented Dec 20, 2018

Huh, I don't see this in numpy-dev job anymore, e.g., https://travis-ci.org/astropy/astropy/jobs/470351360

@pllim pllim closed this as completed Dec 20, 2018
@pllim
Copy link
Member Author

pllim commented Jan 6, 2019

BTW this is still causing numpy-dev job to fail in cron, but not push event. I couldn't find any obvious reason why. But since this has been fixed upstream, I don't think it is worth pursuing...

@astrojuanlu
Copy link
Member

This is still making #8313 fail, see https://circleci.com/gh/astropy/astropy/21267

@astrojuanlu
Copy link
Member

A fix will be released "in the next couple of weeks" scikit-image/scikit-image#3556 (comment)

@pllim
Copy link
Member Author

pllim commented Jan 16, 2019

It is now resurfacing in Sphinx job too.

@pllim
Copy link
Member Author

pllim commented Jan 16, 2019

Attempting to hack around it at #8357

@bsipocz
Copy link
Member

bsipocz commented Mar 19, 2019

scikit-image 0.14.2 is available now both on conda and pip, so I'm closing this issue.

@bsipocz bsipocz closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants