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

TypeError: __init__() got an unexpected keyword argument 'encoding' #13

Closed
Niladri-Chakraborty opened this issue Jul 7, 2017 · 3 comments

Comments

@Niladri-Chakraborty
Copy link

Hello Sir,
I installed all the prerequisites. But when the run the code treetagger_python2.py I got the above error, though when I go through the actual file I could see the init method does take the parameter encoding

File "treetagger_python2.py", line 47, in main.TreeTagger
Failed example:
tt = TreeTagger(encoding='utf-8',language='english')
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest main.TreeTagger[1]>", line 1, in
tt = TreeTagger(encoding='utf-8',language='english')
TypeError: init() got an unexpected keyword argument 'encoding'

@poornagurram
Copy link

you might be running in Python 3.I got the same error and removed the argument and the error was gone.

@tgrrr
Copy link

tgrrr commented Feb 13, 2018

pip3 install -U html5lib=="0.9999999"

here's the html5lib bug on github

from: https://stackoverflow.com/a/39087283

@miotto
Copy link
Owner

miotto commented Jul 24, 2018

Python 2 is no longer supported, please use Python 3.

@miotto miotto closed this as completed Jul 24, 2018
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

No branches or pull requests

4 participants