[AstroPy] astropy 1.1.2 RHEL6 (python 2.6.6) test_imports.py : ImportError: cannot import name _erfa

Renaud Miel renaud.miel at nao.ac.jp
Wed Aug 24 02:16:29 EDT 2016


Hi,

Does anyone know if this failure can be safely ignored ?

astropy.test(package='tests')  fails importing _erfa in test_imports.py
but
astropy.test(package='_erfa') is successful (5 passed)

Thanks

-- 
Renaud Miel

renaud.miel at nao.ac.jp

Computing Team, Chile Observatory,
National Astronomical Observatory of Japan




Logfile:

============================= test session starts ==============================

platform linux2 -- Python 2.6.6 -- py-1.4.30 -- pytest-2.7.3
rootdir: /remote/home/renaud/sys_work/sys-175_astropy/results/python-2.6/customized_user_install/rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests, inifile:

Running tests with Astropy version 1.1.2.
Running tests in /remote/home/renaud/sys_work/sys-175_astropy/results/python-2.6/customized_user_install/rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests.

Date: 2016-08-24T13:19:30

Platform: Linux-2.6.32-431.29.2.el6.x86_64-x86_64-with-redhat-6.4-Santiago

Executable: /usr/bin/python

Full Python Version:
2.6.6 (r266:84292, Aug  9 2016, 06:11:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]

encodings: sys: ascii, locale: UTF-8, filesystem: UTF-8, unicode bits: 20
byteorder: little
float info: dig: 15, mant_dig: 15

Numpy: 1.7.2
Scipy: not available
Matplotlib: not available
h5py: not available
Pandas: not available

collected 46 items

rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests/test_logger.py .............................
rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests/tests/test_imports.py F.
rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests/tests/test_open_file_detection.py .
rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests/tests/test_quantity_helpers.py .
rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests/tests/test_run_tests.py ........
rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests/tests/test_skip_remote_data.py s
rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests/tests/test_socketblocker.py ...s

=================================== FAILURES ===================================
_________________________________ test_imports _________________________________

     def test_imports():
         """
         This just imports all modules in astropy, making sure they don't have any
         dependencies that sneak through
         """
     
         from ...utils import find_current_module
     
         pkgornm = find_current_module(1).__name__.split('.')[0]
     
         if isinstance(pkgornm, six.string_types):
             package = pkgutil.get_loader(pkgornm).load_module(pkgornm)
         elif (isinstance(pkgornm, types.ModuleType) and
                 '__init__' in pkgornm.__file__):
             package = pkgornm
         else:
             msg = 'test_imports is not determining a valid package/package name'
             raise TypeError(msg)
     
         if hasattr(package, '__path__'):
             pkgpath = package.__path__
         elif hasattr(package, '__file__'):
             pkgpath = os.path.split(package.__file__)[0]
         else:
             raise AttributeError('package to generate config items for does not '
                                  'have __file__ or __path__')
     
         if six.PY3:
             excludes = _py2_packages
         else:
             excludes = _py3_packages
     
         prefix = package.__name__ + '.'
     
         def onerror(name):
             if not any(name.startswith(excl) for excl in excludes):
                 # A legitimate error occurred in a module that wasn't excluded
                 raise
     
         for imper, nm, ispkg in pkgutil.walk_packages(pkgpath, prefix,
>                                                     onerror=onerror):

rhel6/python-2.6/lib/python2.6/site-packages/astropy/tests/tests/test_imports.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python2.6/pkgutil.py:113: in walk_packages
     onerror(name)
/usr/lib64/python2.6/pkgutil.py:110: in walk_packages
     __import__(name)
rhel6/python-2.6/lib/python2.6/site-packages/astropy/convolution/__init__.py:6: in <module>
     from .core import *
rhel6/python-2.6/lib/python2.6/site-packages/astropy/convolution/core.py:25: in <module>
     from .utils import (discretize_model, add_kernel_arrays_1D,
rhel6/python-2.6/lib/python2.6/site-packages/astropy/convolution/utils.py:7: in <module>
     from ..modeling.core import FittableModel, custom_model
rhel6/python-2.6/lib/python2.6/site-packages/astropy/modeling/__init__.py:11: in <module>
     from . import models
rhel6/python-2.6/lib/python2.6/site-packages/astropy/modeling/models.py:10: in <module>
     from .core import custom_model
rhel6/python-2.6/lib/python2.6/site-packages/astropy/modeling/core.py:48: in <module>
     from ..nddata.utils import add_array, extract_array
rhel6/python-2.6/lib/python2.6/site-packages/astropy/nddata/__init__.py:23: in <module>
     from .utils import *
rhel6/python-2.6/lib/python2.6/site-packages/astropy/nddata/utils.py:11: in <module>
     from astropy.coordinates import SkyCoord
rhel6/python-2.6/lib/python2.6/site-packages/astropy/coordinates/__init__.py:13: in <module>
     from .baseframe import *
rhel6/python-2.6/lib/python2.6/site-packages/astropy/coordinates/baseframe.py:1181: in <module>
     from .earth import EarthLocation
rhel6/python-2.6/lib/python2.6/site-packages/astropy/coordinates/earth.py:11: in <module>
     from .builtin_frames import ITRS
rhel6/python-2.6/lib/python2.6/site-packages/astropy/coordinates/builtin_frames/__init__.py:44: in <module>
     from . import icrs_cirs_transforms
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

     """
     from __future__ import (absolute_import, unicode_literals, division,
                             print_function)
     
     import numpy as np
     
     from ... import units as u
     from ..baseframe import frame_transform_graph
     from ..transformations import FunctionTransform
     from ..representation import (SphericalRepresentation, CartesianRepresentation,
                                   UnitSphericalRepresentation)
>   from ... import _erfa as erfa
E   ImportError: cannot import name _erfa

rhel6/python-2.6/lib/python2.6/site-packages/astropy/coordinates/builtin_frames/icrs_cirs_transforms.py:17: ImportError
----------------------------- Captured stderr call -----------------------------
WARNING: AstropyDeprecationWarning: Python 2.6 will no longer be supported from Astropy v1.2.0 and above [astropy]
/remote/home/renaud/sys_work/sys-175_astropy/results/python-2.6/customized_user_install/rhel6/python-2.6/lib/python2.6/site-packages/astropy/analytic_functions/blackbody.py:30: RuntimeWarning: overflow encountered in expm1
   _has_buggy_expm1 = np.isnan(np.expm1(1000))
================ 1 failed, 43 passed, 2 skipped in 0.98 seconds ================






More information about the AstroPy mailing list