MTgeophysics / mtpy

Python toolbox for standard Magnetotelluric (MT) data analysis
GNU General Public License v3.0
147 stars 66 forks source link

TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType #14

Closed zhang01GA closed 6 years ago

zhang01GA commented 6 years ago

Beginning today, I suddenly cannot run py.test unittest suite in my Ubuntu desktop at home. For example $ py.test tests/utils/ =========================================================== test session starts ============================================================ platform linux2 -- Python 2.7.12, pytest-3.0.7, py-1.4.31, pluggy-0.4.0 rootdir: /Softlab/Githubz/mtpy, inifile: plugins: cov-2.4.0, celery-4.0.2 collected 6 items / 1 errors

================================================================== ERRORS ================================================================== _____ ERROR collecting tests/utils/testPTShapeFile.py ____ tests/utils/test_PTShapeFile.py:6: in from mtpy.utils.shapefiles import create_phase_tensor_shpfiles mtpy/utils/shapefiles.py:10: in import mtpy.modeling.modem mtpy/modeling/modem/init.py:2: in from .station import Stations mtpy/modeling/modem/station.py:13: in from mtpy.core import mt as mt mtpy/core/mt.py:35: in raise _logger.warn('Note: need scipy version 0.14.0 or higher or interpolation ' E TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType ------------------------------------------------------------- Captured stdout -------------------------------------------------------------- 2017-11-22T20:36:02 - mtpy.utils.decorator - WARNING - GDAL_DATA environment variable is not set 2017-11-22T20:36:02 - mtpy.utils.decorator - INFO - Trying to find gdal-data path ... 2017-11-22T20:36:02 - mtpy.utils.decorator - INFO - Found gdal-data path: /usr/share/gdal/2.2 2017-11-22T20:36:02 - mtpy.utils.decorator - INFO - GDAL_DATA is set to: /usr/share/gdal/2.2 2017-11-22T20:36:02 - mtpy.utils.decorator - INFO - GDAL_DATA is set to: /usr/share/gdal/2.2 2017-11-22T20:36:02 - mtpy.utils.decorator - INFO - GDAL_DATA is set to: /usr/share/gdal/2.2 2017-11-22T20:36:02 - mtpy.utils.decorator - INFO - GDAL_DATA is set to: /usr/share/gdal/2.2 2017-11-22T20:36:03 - mtpy.core.mt - WARNING - Note: need scipy version 0.14.0 or higher or interpolation might not work. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ========================================================= 1 error in 0.64 seconds ==================================================

zhang01GA commented 6 years ago

It may be due to python-3 environment Python2's py.test appear OK.