Skip to content

testing the install: base.py:1600: RuntimeError and others #2258

Closed
@cclairec

Description

@cclairec

Summary

Hi nipype comunity!

I need your help! :)
I followed the instructions on the developer webpage, meaning I did:

pip install -r requirements.txt
sudo python setup.py develop

So now I am testing the install (sudo make tests), and I have the following message at the end:

> ================================= 6 failed, 2587 passed, 225 skipped, 7 xfailed, 12 warnings in 106.69 seconds ==================================
> make: *** [Makefile:60: test-code] Error 1


The errors are:

> ============================================================== FAILURES ===============================================================
> _______________________________________________ [doctest] nipype.interfaces.bids_utils ________________________________________________
> 005 available interfaces are:
> 006 
> 007 BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids.
> 008 
> 009 Change directory to provide relative paths for doctests
> 010 >>> import os
> 011 >>> import bids
> 012 >>> filepath = os.path.realpath(os.path.dirname(bids.__file__))
> 013 >>> datadir = os.path.realpath(os.path.join(filepath, 'grabbids/tests/data/'))
> 014 >>> os.chdir(datadir)
> UNEXPECTED EXCEPTION: OSError(2, 'No such file or directory')
> Traceback (most recent call last):
> 
>   File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
>     compileflags, 1) in test.globs
> 
>   File "<doctest nipype.interfaces.bids_utils[4]>", line 1, in <module>
> 
> OSError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/bids/grabbids/tests/data'
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/bids_utils.py:14: UnexpectedException
> _______________________________________ [doctest] nipype.interfaces.bids_utils.BIDSDataGrabber ________________________________________
> 058 
> 059     >>> from nipype.interfaces.bids_utils import BIDSDataGrabber
> 060     >>> from os.path import basename
> 061 
> 062     By default, the BIDSDataGrabber fetches anatomical and functional images
> 063     from a project, and makes BIDS entities (e.g. subject) available for
> 064     filtering outputs.
> 065 
> 066     >>> bg = BIDSDataGrabber()
> 067     >>> bg.inputs.base_dir = 'ds005/'
> UNEXPECTED EXCEPTION: TraitError(u"The trait 'base_dir' of a BIDSDataGrabberInputSpec instance is an existing directory name, but the path  'ds005/' does not exist.",)
> Traceback (most recent call last):
> 
>   File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
>     compileflags, 1) in test.globs
> 
>   File "<doctest nipype.interfaces.bids_utils.BIDSDataGrabber[3]>", line 1, in <module>
> 
>   File "/home/ccury/Codes/NipypeVisages/nipype/interfaces/traits_extension.py", line 187, in validate
>     class_of(object), self.info_text, value))
> 
> TraitError: The trait 'base_dir' of a BIDSDataGrabberInputSpec instance is an existing directory name, but the path  'ds005/' does not exist.
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/bids_utils.py:67: UnexpectedException
> ____________________________________________________ test_cmdline_profiling[0.5-3] ____________________________________________________
> 
> tmpdir = local('/tmp/pytest-of-ccury/pytest-4/test_cmdline_profiling_0_5_3_0'), mem_gb = 0.5, n_procs = 3
> 
>     @pytest.mark.skipif(os.getenv('CI_SKIP_TEST', False), reason='disabled in CI tests')
>     @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)])
>     def test_cmdline_profiling(tmpdir, mem_gb, n_procs):
>         """
>         Test runtime profiler correctly records workflow RAM/CPUs consumption
>         of a CommandLine-derived interface
>         """
>         from nipype import config
>         config.set('execution', 'resource_monitor_frequency', '0.2')  # Force sampling fast
>     
>         tmpdir.chdir()
>         iface = UseResources(mem_gb=mem_gb, n_procs=n_procs)
> >       result = iface.run()
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/tests/test_resource_monitor.py:60: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1088: in run
>     runtime = self._run_interface(runtime)
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1654: in _run_interface
>     self.raise_exception(runtime)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> 
> self = <nipype.interfaces.tests.test_resource_monitor.UseResources object at 0x7f04a1dca710>
> runtime = Bunch(cmdline=u'/home/ccury/Codes/NipypeVisages/nipype/utils/tests/use_resourc...e RuntimeError occurred while running interface UseResources.',), version=None)
> 
>     def raise_exception(self, runtime):
>         raise RuntimeError(
>             ('Command:\n{cmdline}\nStandard output:\n{stdout}\n'
>              'Standard error:\n{stderr}\nReturn code: {returncode}').format(
> >                **runtime.dictcopy()))
> E       RuntimeError: Command:
> E       /home/ccury/Codes/NipypeVisages/nipype/utils/tests/use_resources -g 0.500000 -p 3
> E       Standard output:
> E       
> E       Standard error:
> E       
> E       Return code: 1
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1600: RuntimeError
> ____________________________________________________ test_cmdline_profiling[2.2-8] ____________________________________________________
> 
> tmpdir = local('/tmp/pytest-of-ccury/pytest-4/test_cmdline_profiling_2_2_8_0'), mem_gb = 2.2, n_procs = 8
> 
>     @pytest.mark.skipif(os.getenv('CI_SKIP_TEST', False), reason='disabled in CI tests')
>     @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)])
>     def test_cmdline_profiling(tmpdir, mem_gb, n_procs):
>         """
>         Test runtime profiler correctly records workflow RAM/CPUs consumption
>         of a CommandLine-derived interface
>         """
>         from nipype import config
>         config.set('execution', 'resource_monitor_frequency', '0.2')  # Force sampling fast
>     
>         tmpdir.chdir()
>         iface = UseResources(mem_gb=mem_gb, n_procs=n_procs)
> >       result = iface.run()
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/tests/test_resource_monitor.py:60: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1088: in run
>     runtime = self._run_interface(runtime)
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1654: in _run_interface
>     self.raise_exception(runtime)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> 
> self = <nipype.interfaces.tests.test_resource_monitor.UseResources object at 0x7f04a33d4f90>
> runtime = Bunch(cmdline=u'/home/ccury/Codes/NipypeVisages/nipype/utils/tests/use_resourc...e RuntimeError occurred while running interface UseResources.',), version=None)
> 
>     def raise_exception(self, runtime):
>         raise RuntimeError(
>             ('Command:\n{cmdline}\nStandard output:\n{stdout}\n'
>              'Standard error:\n{stderr}\nReturn code: {returncode}').format(
> >                **runtime.dictcopy()))
> E       RuntimeError: Command:
> E       /home/ccury/Codes/NipypeVisages/nipype/utils/tests/use_resources -g 2.200000 -p 8
> E       Standard output:
> E       
> E       Standard error:
> E       
> E       Return code: 1
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1600: RuntimeError
> ____________________________________________________ test_cmdline_profiling[0.8-4] ____________________________________________________
> 
> tmpdir = local('/tmp/pytest-of-ccury/pytest-4/test_cmdline_profiling_0_8_4_0'), mem_gb = 0.8, n_procs = 4
> 
>     @pytest.mark.skipif(os.getenv('CI_SKIP_TEST', False), reason='disabled in CI tests')
>     @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)])
>     def test_cmdline_profiling(tmpdir, mem_gb, n_procs):
>         """
>         Test runtime profiler correctly records workflow RAM/CPUs consumption
>         of a CommandLine-derived interface
>         """
>         from nipype import config
>         config.set('execution', 'resource_monitor_frequency', '0.2')  # Force sampling fast
>     
>         tmpdir.chdir()
>         iface = UseResources(mem_gb=mem_gb, n_procs=n_procs)
> >       result = iface.run()
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/tests/test_resource_monitor.py:60: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1088: in run
>     runtime = self._run_interface(runtime)
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1654: in _run_interface
>     self.raise_exception(runtime)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> 
> self = <nipype.interfaces.tests.test_resource_monitor.UseResources object at 0x7f04a1d98410>
> runtime = Bunch(cmdline=u'/home/ccury/Codes/NipypeVisages/nipype/utils/tests/use_resourc...e RuntimeError occurred while running interface UseResources.',), version=None)
> 
>     def raise_exception(self, runtime):
>         raise RuntimeError(
>             ('Command:\n{cmdline}\nStandard output:\n{stdout}\n'
>              'Standard error:\n{stderr}\nReturn code: {returncode}').format(
> >                **runtime.dictcopy()))
> E       RuntimeError: Command:
> E       /home/ccury/Codes/NipypeVisages/nipype/utils/tests/use_resources -g 0.800000 -p 4
> E       Standard output:
> E       
> E       Standard error:
> E       
> E       Return code: 1
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1600: RuntimeError
> ____________________________________________________ test_cmdline_profiling[1.5-1] ____________________________________________________
> 
> tmpdir = local('/tmp/pytest-of-ccury/pytest-4/test_cmdline_profiling_1_5_1_0'), mem_gb = 1.5, n_procs = 1
> 
>     @pytest.mark.skipif(os.getenv('CI_SKIP_TEST', False), reason='disabled in CI tests')
>     @pytest.mark.parametrize("mem_gb,n_procs", [(0.5, 3), (2.2, 8), (0.8, 4), (1.5, 1)])
>     def test_cmdline_profiling(tmpdir, mem_gb, n_procs):
>         """
>         Test runtime profiler correctly records workflow RAM/CPUs consumption
>         of a CommandLine-derived interface
>         """
>         from nipype import config
>         config.set('execution', 'resource_monitor_frequency', '0.2')  # Force sampling fast
>     
>         tmpdir.chdir()
>         iface = UseResources(mem_gb=mem_gb, n_procs=n_procs)
> >       result = iface.run()
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/tests/test_resource_monitor.py:60: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1088: in run
>     runtime = self._run_interface(runtime)
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1654: in _run_interface
>     self.raise_exception(runtime)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> 
> self = <nipype.interfaces.tests.test_resource_monitor.UseResources object at 0x7f0505b94710>
> runtime = Bunch(cmdline=u'/home/ccury/Codes/NipypeVisages/nipype/utils/tests/use_resourc...e RuntimeError occurred while running interface UseResources.',), version=None)
> 
>     def raise_exception(self, runtime):
>         raise RuntimeError(
>             ('Command:\n{cmdline}\nStandard output:\n{stdout}\n'
>              'Standard error:\n{stderr}\nReturn code: {returncode}').format(
> >                **runtime.dictcopy()))
> E       RuntimeError: Command:
> E       /home/ccury/Codes/NipypeVisages/nipype/utils/tests/use_resources -g 1.500000 -p 1
> E       Standard output:
> E       
> E       Standard error:
> E       
> E       Return code: 1
> 
> /home/ccury/Codes/NipypeVisages/nipype/interfaces/base.py:1600: RuntimeError
> 

The code I use is from the 25th of october: https://github.com/cclairec/NipypeVisages.git

Platform details:

I am using Fedora.

Please paste the output of: python -c "import nipype; print(nipype.get_info()); print(nipype.__version__)"

NipypeVisages$ python -c "import nipype; print(nipype.get_info()); print(nipype.version)"
fatal: No names found, cannot describe anything.
{'nibabel_version': '2.2.0', 'sys_executable': '/usr/bin/python', 'networkx_version': '2.0', 'numpy_version': '1.12.1', 'sys_platform': 'linux2', 'sys_version': '2.7.13 (default, Sep 5 2017, 08:53:59) \n[GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]', 'commit_source': u'repository', 'commit_hash': 'b61ad7b', 'pkg_path': 'nipype', 'nipype_version': u'1.0.0-dev', 'traits_version': '4.6.0', 'scipy_version': '0.19.1'}
1.0.0-dev

Execution environment

I use Fedora 26:
64 bit
Intel® Core™ i7-3540M CPU @ 3.00GHz × 4

Let me know if you need more informations !

Many thanks in advance for your time and help.

Cheers,
Claire.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions