Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

TypeError: __init__() got an unexpected keyword argument 'lang' #20

Closed
TheRockettek opened this issue Apr 15, 2019 · 3 comments
Closed
Labels
invalid This doesn't seem right question Further information is requested

Comments

@TheRockettek
Copy link

TheRockettek commented Apr 15, 2019

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/profanity_filter/profanity_filter.py", line 154, in __init__
    spells=spells,
  File "/usr/local/lib/python3.6/dist-packages/profanity_filter/profanity_filter.py", line 180, in config
    self._set_languages(languages, load_morphs=morphs is None, load_nlps=nlps is None, load_spells=spells is None)
  File "/usr/local/lib/python3.6/dist-packages/profanity_filter/profanity_filter.py", line 418, in _set_languages
    self.morphs = None
  File "/usr/local/lib/python3.6/dist-packages/profanity_filter/profanity_filter.py", line 319, in morphs
    self._morphs[language] = MorphAnalyzer(lang=language)
TypeError: __init__() got an unexpected keyword argument 'lang'
@rominf
Copy link
Owner

rominf commented Apr 15, 2019

I think you've installed the pymorphy2 from PyPI, but not from the git. Please uninstall it and follow https://github.com/rominf/profanity-filter#pymorphy2

@rominf
Copy link
Owner

rominf commented Apr 18, 2019

@TheRockettek, is the problem solved?

@TheRockettek
Copy link
Author

Oh yeah it did work. Sorry, forgot to respond.

@rominf rominf added invalid This doesn't seem right question Further information is requested labels Apr 18, 2019
@rominf rominf closed this as completed Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants