vzhou842 / profanity-check

A fast, robust Python library to check for offensive language in strings.

Home Page:https://pypi.org/project/profanity-check

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to test

inandi opened this issue · comments

getting this error while running the test files

PS E:\xampp\htdocs\profanity-check\tests> python .\test_profanity_check.py
Traceback (most recent call last):
  File ".\test_profanity_check.py", line 1, in <module>
    from profanity_check import predict, predict_prob
  File "C:\Python27\lib\site-packages\profanity_check\__init__.py", line 1, in <module>
    from .profanity_check import predict, predict_prob
  File "C:\Python27\lib\site-packages\profanity_check\profanity_check.py", line 5, in <module>
    vectorizer = joblib.load(pkg_resources.resource_filename('profanity_check', 'data/vectorizer.joblib'))
  File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 598, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 526, in _unpickle
    obj = unpickler.load()
  File "C:\Python27\lib\pickle.py", line 864, in load
    dispatch[key](self)
  File "C:\Python27\lib\pickle.py", line 892, in load_proto
    raise ValueError, "unsupported pickle protocol: %d" % proto
ValueError: unsupported pickle protocol: 3

I am new in python, please forgive me if this is such a silly issue. thanks in advance!!

You need to install pytest in your virtual env and then test with it.

Try
pip3 install pytest
...
pytest.