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 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

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

@lesteve
Copy link
Member Author

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
@lesteve lesteve deleted the fix-plot-out-of-core-classification branch September 25, 2017 06:21
@jnothman jnothman added this to the 0.19.1 milestone Sep 25, 2017
jnothman pushed 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 pushed 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants