Hi again,

After updating scikit-learn (I think I was running that script from the
newest version of scikit-learn, while my installed version was older), I get
the following error:

$ python document_classification_20newsgroups.py
Traceback (most recent call last):
  File "document_classification_20newsgroups.py", line 34, in <module>
    from sklearn.datasets import fetch_20newsgroups
  File
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sklearn/datasets/__init__.py",
line 23, in <module>
    from .twenty_newsgroups import fetch_20newsgroups
  File
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sklearn/datasets/twenty_newsgroups.py",
line 105
    _before, _blankline, after = text.partition(u'\n\n')
                                                      ^
SyntaxError: invalid syntax
harold:examples admin$ python document_classification_20newsgroups.py
Traceback (most recent call last):
  File "document_classification_20newsgroups.py", line 34, in <module>
    from sklearn.datasets import fetch_20newsgroups
  File
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sklearn/datasets/__init__.py",
line 23, in <module>
    from .twenty_newsgroups import fetch_20newsgroups
  File
"/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/sklearn/datasets/twenty_newsgroups.py",
line 105
    _before, _blankline, after = text.partition(u'\n\n')
                                                      ^
SyntaxError: invalid syntax

I guess scikit-learn doesn't play nice with Python 3.2 ?

Harold



On Fri, Jul 26, 2013 at 11:51 AM, Harold Nguyen <har...@nexgate.com> wrote:

> Hi experts,
>
> I was going through the example here:
>
> http://scikit-learn.org/stable/auto_examples/document_classification_20newsgroups.html#example-document-classification-20newsgroups-py
>
> But when I run, I get the following error message:
>
> $ python document_classification_20newsgroups.py --top20
>
> ...
> Loading 20 newsgroups dataset for categories:
> ['alt.atheism', 'talk.religion.misc', 'comp.graphics', 'sci.space']
> Traceback (most recent call last):
>   File "document_classification_20newsgroups.py", line 116, in <module>
>     remove=remove)
> TypeError: fetch_20newsgroups() got an unexpected keyword argument 'remove'
>
>
> Am I doing something wrong ? Thanks for any help!
>
> Harold
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to