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

[MRG] Fix plot_out_of_core_classification.py. #9815

Merged

Conversation

@lesteve
Copy link
Member

@lesteve lesteve commented Sep 21, 2017

Starting from an empty ~/scikit_learn_data I got AttributeError: module 'sklearn.externals.six.moves.urllib_request' has no attribute 'urlretrieve'.

I have to say I am not sure why this is happening and why we did not spot it earlier on CircleCI, maybe because ~/scikit_learn_data was cached.

I'll merge this when CircleCI is green.

Starting from empty ~/scikit_learn_data got AttributeError: module
'sklearn.externals.six.moves.urllib_request' has no attribute
'urlretrieve'.
@lesteve
Copy link
Member Author

@lesteve lesteve commented Sep 21, 2017

And just for fun, a snippet that reproduces the problem and seems to indicate something is wrong with six:

from sklearn.externals.six.moves.urllib.request import urlretrieve
from sklearn.externals.six.moves import urllib
urllib.request.urlretrieve
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-0011d0171987> in <module>()
      1 from sklearn.externals.six.moves.urllib.request import urlretrieve
      2 from sklearn.externals.six.moves import urllib
----> 3 urllib.request.urlretrieve

AttributeError: module 'sklearn.externals.six.moves.urllib_request' has no attribute 'urlretrieve'

This is probably due to the fact we vendor an old copy of six. The same snippet works fine with six 1.10.0:

from six.moves.urllib.request import urlretrieve
from six.moves import urllib
urllib.request.urlretrieve
@jnothman
Copy link
Member

@jnothman jnothman commented Sep 24, 2017

Circle is failing here. Would vendoring a newer six solve it?

@lesteve
Copy link
Member Author

@lesteve lesteve commented Sep 24, 2017

Hmmm I think this is the mldata server which was having some problems, I'll restart CircleCI to see whether it goes away.

@lesteve lesteve merged commit cceb9b2 into scikit-learn:master Sep 25, 2017
6 checks passed
6 checks passed
ci/circleci Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing a78b66f...4c3992b
Details
codecov/project 96.17% remains the same compared to a78b66f
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: Python No alert changes
Details
@lesteve lesteve deleted the lesteve:fix-plot-out-of-core-classification branch Sep 25, 2017
@jnothman jnothman added this to the 0.19.1 milestone Sep 25, 2017
jnothman added a commit to jnothman/scikit-learn that referenced this pull request Oct 3, 2017
Starting from empty ~/scikit_learn_data got AttributeError: module
'sklearn.externals.six.moves.urllib_request' has no attribute
'urlretrieve'.
maskani-moh added a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
Starting from empty ~/scikit_learn_data got AttributeError: module
'sklearn.externals.six.moves.urllib_request' has no attribute
'urlretrieve'.
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
Starting from empty ~/scikit_learn_data got AttributeError: module
'sklearn.externals.six.moves.urllib_request' has no attribute
'urlretrieve'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants