nosetest failed #1665

Closed
vikasgrover007 opened this Issue Feb 9, 2013 · 6 comments

Comments

Projects
None yet
4 participants

FAIL: Doctest: sklearn.datasets.mldata.fetch_mldata

Traceback (most recent call last):
File "/usr/lib/python2.6/doctest.py", line 2163, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for sklearn.datasets.mldata.fetch_mldata
File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 28, in fetch_mldata


File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 85, in sklearn.datasets.mldata.fetch_mldata
Failed example:
iris = fetch_mldata('iris')

Owner

amueller commented Feb 9, 2013

Thanks for the report. Is this the full traceback? It looks like there is something missing, but I'm not sure.

no full traceback is following:

FAIL: Doctest: sklearn.datasets.mldata.fetch_mldata
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/doctest.py", line 2163, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for sklearn.datasets.mldata.fetch_mldata
  File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 28, in fetch_mldata

----------------------------------------------------------------------
File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 85, in sklearn.datasets.mldata.fetch_mldata
Failed example:
    iris = fetch_mldata('iris')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest sklearn.datasets.mldata.fetch_mldata[1]>", line 1, in <module>
        iris = fetch_mldata('iris')
      File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 121, in fetch_mldata
        mldata_url = urllib2.urlopen(urlname)
      File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "/usr/lib/python2.6/urllib2.py", line 391, in open
        response = self._open(req, data)
      File "/usr/lib/python2.6/urllib2.py", line 409, in _open
        '_open', req)
      File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.6/urllib2.py", line 1170, in http_open
        return self.do_open(httplib.HTTPConnection, req)
      File "/usr/lib/python2.6/urllib2.py", line 1145, in do_open
        raise URLError(err)
    URLError: <urlopen error [Errno 111] Connection refused>
----------------------------------------------------------------------
File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 86, in sklearn.datasets.mldata.fetch_mldata
Failed example:
    iris.target[0]
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest sklearn.datasets.mldata.fetch_mldata[2]>", line 1, in <module>
        iris.target[0]
    NameError: name 'iris' is not defined
----------------------------------------------------------------------
File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 88, in sklearn.datasets.mldata.fetch_mldata
Failed example:
    print(iris.data[0])
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest sklearn.datasets.mldata.fetch_mldata[3]>", line 1, in <module>
        print(iris.data[0])
    NameError: name 'iris' is not defined
----------------------------------------------------------------------
File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 93, in sklearn.datasets.mldata.fetch_mldata
Failed example:
    leuk = fetch_mldata('leukemia', transpose_data=True)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest sklearn.datasets.mldata.fetch_mldata[4]>", line 1, in <module>
        leuk = fetch_mldata('leukemia', transpose_data=True)
      File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 121, in fetch_mldata
        mldata_url = urllib2.urlopen(urlname)
      File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "/usr/lib/python2.6/urllib2.py", line 391, in open
        response = self._open(req, data)
      File "/usr/lib/python2.6/urllib2.py", line 409, in _open
        '_open', req)
      File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.6/urllib2.py", line 1170, in http_open
        return self.do_open(httplib.HTTPConnection, req)
      File "/usr/lib/python2.6/urllib2.py", line 1145, in do_open
        raise URLError(err)
    URLError: <urlopen error [Errno 111] Connection refused>
----------------------------------------------------------------------
File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 94, in sklearn.datasets.mldata.fetch_mldata
Failed example:
    print(leuk.data.shape[0])
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest sklearn.datasets.mldata.fetch_mldata[5]>", line 1, in <module>
        print(leuk.data.shape[0])
    NameError: name 'leuk' is not defined
----------------------------------------------------------------------
File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 99, in sklearn.datasets.mldata.fetch_mldata
Failed example:
    iris2 = fetch_mldata('datasets-UCI iris', target_name=1,
                         data_name=0)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest sklearn.datasets.mldata.fetch_mldata[6]>", line 2, in <module>
        data_name=0)
      File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 121, in fetch_mldata
        mldata_url = urllib2.urlopen(urlname)
      File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "/usr/lib/python2.6/urllib2.py", line 391, in open
        response = self._open(req, data)
      File "/usr/lib/python2.6/urllib2.py", line 409, in _open
        '_open', req)
      File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.6/urllib2.py", line 1170, in http_open
        return self.do_open(httplib.HTTPConnection, req)
      File "/usr/lib/python2.6/urllib2.py", line 1145, in do_open
        raise URLError(err)
    URLError: <urlopen error [Errno 111] Connection refused>
----------------------------------------------------------------------
File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 101, in sklearn.datasets.mldata.fetch_mldata
Failed example:
    iris3 = fetch_mldata('datasets-UCI iris',
                         target_name='class', data_name='double0')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1253, in __run
        compileflags, 1) in test.globs
      File "<doctest sklearn.datasets.mldata.fetch_mldata[7]>", line 2, in <module>
        target_name='class', data_name='double0')
      File "/usr/local/lib/python2.6/dist-packages/sklearn/datasets/mldata.py", line 121, in fetch_mldata
        mldata_url = urllib2.urlopen(urlname)
      File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "/usr/lib/python2.6/urllib2.py", line 391, in open
        response = self._open(req, data)
      File "/usr/lib/python2.6/urllib2.py", line 409, in _open
        '_open', req)
      File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.6/urllib2.py", line 1170, in http_open
        return self.do_open(httplib.HTTPConnection, req)
      File "/usr/lib/python2.6/urllib2.py", line 1145, in do_open
        raise URLError(err)
    URLError: <urlopen error [Errno 111] Connection refused>


----------------------------------------------------------------------
Ran 1483 tests in 242.530s

FAILED (SKIP=10, failures=1)
Owner

amueller commented Feb 9, 2013

We saw that error in travis a couple of times. I am not entirely sure why that happens. It fails to download the datasets from mldata.org. But actually during the tests it shouldn't really try that and use a mock lib instead.... we'll have to investigate that a bit closer.
Can you give me your nose version?

nose-1.2.1

On Sat, Feb 9, 2013 at 3:11 PM, Andreas Mueller notifications@github.comwrote:

We saw that error in travis a couple of times. I am not entirely sure why
that happens. It fails to download the datasets from mldata.org. But
actually during the tests it shouldn't really try that and use a mock lib
instead.... we'll have to investigate that a bit closer.
Can you give me your nose version?


Reply to this email directly or view it on GitHubhttps://github.com/scikit-learn/scikit-learn/issues/1665#issuecomment-13328700..

@amueller amueller added this to the 0.15.1 milestone Jul 18, 2014

@amueller amueller modified the milestones: 0.16, 0.17 Sep 11, 2015

@amueller amueller modified the milestones: 0.17, 0.18 Nov 2, 2015

Contributor

mth4saurabh commented Jan 3, 2016

@amueller all the errors seen in traceback are from doctests, so I ran nosetests -v --with-doctest on sklearn/datasests, there was no error. So I think introduction of test_home_data resolved the error. I am not sure though, what do you think?

Member

lesteve commented Aug 31, 2016

Closing, since this is quite old and is likely not to be relevant any more.

@lesteve lesteve closed this Aug 31, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment