This repository has been archived by the owner on Feb 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
TypeError when calling extra_profane_word_dictionaries #21
Comments
Cannot reproduce. Have you changed |
Closing due inactivity. Feel free to open it again. |
Hi, I encountered the same bug above. |
@hcao2015 Please attach a minimal working example. |
Sorry, I figured out it was the wrong format of self._DATA_DIR that caused the problem |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When supplying a dict ({lang: {set}}) to extra_profane_word_dictionaries, it raises a TypeError after trying to divide a string by a string:
Traceback (most recent call last): File "<console>", line 4, in <module> File "/home/hwhite/frac37/lib/python3.7/site-packages/profanity_filter/profanity_filter.py", line 265, in custom_profane_word_dictionaries self.clear_cache() File "/home/hwhite/frac37/lib/python3.7/site-packages/profanity_filter/profanity_filter.py", line 384, in clear_cache self._update_profane_word_dictionary_files() File "/home/hwhite/frac37/lib/python3.7/site-packages/profanity_filter/profanity_filter.py", line 429, in _update_profane_word_dictionary_files profane_word_file = self._DATA_DIR / f'{language}_profane_words.txt' TypeError: unsupported operand type(s) for /: 'str' and 'str'
The text was updated successfully, but these errors were encountered: