The error message is pointing to a line in boilerpipe/extract/__init__.py, which makes a call to the unicode built-in function.

I assume the link below is the source code for the package you are using. If so, it appears to be written for Python 2.7, which you can see if you look near the end of this file:

https://github.com/misja/python-boilerpipe/blob/master/setup.py

You have several options as far as I can see:

  1. Find a Python 3 port of this package. There are at least a few out there (here's one and here's another).
  2. Port the package to Python 3 yourself (if that is the only error, you could simply change that line to use str, but later changes could cause problems with other parts of the package). This official tool should be of assistance; this official guide should, as well.
  3. Port you project to Python 2.7 and continue using the same package.

I hope this helps!

Answer from Collin R on Stack Overflow
🌐
GitHub
github.com › alphagov › govukurllookup › issues › 6
Tests fail in Python 3.6 (unicode function not found) · Issue #6 · alphagov/govukurllookup
August 15, 2017 - This may not be important if we never plan to run this code on 3.6, but it's worth knowing! govukurllookup.py:123: NameError During handling of the above exception, another exception occurred: self =
Author: alphagov
🌐
Python Clear
pythonclear.com › home › errors › nameerror: name unicode is not defined in python
NameError: Name Unicode Is Not Defined in Python - Python Clear
January 27, 2023 - To resolve this, you may manipulate the symbol table of the imported library, which can be done by assigning the str() function to the Unicode of the imported library. ... In python 3, the str.
🌐
Delft Stack
delftstack.com › home › howto › python › python nameerror global name unicode is not defined
How to Solve the NameError: Global Name 'unicode' Is Not Defined in Python | Delft Stack
February 2, 2024 - If you are not using the unicode() function, the third-party library that you are using in your program might be using this function. Due to this, the program might be running into the NameError exception.
🌐
Itsourcecode
itsourcecode.com › home › nameerror: name unicode is not defined
Nameerror: name unicode is not defined [SOLVED]
May 2, 2023 - In Python 3, unicode has been renamed to str. ... The error occurs because the “unicode” function is not defined or it has been renamed in Python 3.
🌐
GitHub
github.com › cocodataset › cocoapi › issues › 49
Name 'unicode' is not defined in Python 3 · Issue #49 · cocodataset/cocoapi
May 13, 2017 - I'm getting this error when I call loadRes() with Python 3.5. Python 3 replaced unicode with str.
Author: cocodataset
🌐
GitHub
github.com › LightTable › Python › issues › 24
NameError: name 'unicode' is not defined · Issue #24 · LightTable/Python
February 12, 2015 - AppData\Local\LightTable\plugins\Python\py-src\ltmain.py", line 197, in handleEval code= compile(ensureUtf(code), ensureUtf(data[2]["name"]), 'exec') File "\AppData\Local\LightTable\plugins\Python\py-src\ltmain.py", line 50, in ensureUtf if type(s) == unicode: NameError: name 'unicode' is not defined
Author: LightTable
Find elsewhere
🌐
Java2Blog
java2blog.com › home › python › python error › [fixed] nameerror name ‘unicode’ is not defined in python
[Fixed] NameError Name 'unicode' is Not Defined in Python - Java2Blog
December 27, 2022 - To resolve the NameError: name 'unicode' is not defined, replace the occurrence of unicode() with str(). This issue occurs because unicode() was renamed to str() in Python 3.
🌐
Python documentation
docs.python.org › 3 › howto › unicode.html
Unicode HOWTO — Python 3.14.7 documentation
The default encoding for Python source code is UTF-8, so you can simply include a Unicode character in a string literal: try: with open('/tmp/input.txt', 'r') as f: ... except OSError: # 'File not found' error message.
🌐
GitHub
github.com › tensorflow › models › issues › 5203
NameError: name 'unicode' is not defined in object_detection/utils/object_detection_evaluation.py · Issue #5203 · tensorflow/models
August 29, 2018 - @pkulzc I ran the legacy/eval.py and the error shows up NameError: name 'unicode' is not defined in object_detection/utils/object_detection_evaluation.py, line 332 · try: category_name = unicode(category_name, 'utf-8') except TypeError: pass · The Python3 doesn't have the type unicode anymore and it has been renamed to str.
Author: tensorflow
🌐
Python
bugs.python.org › issue16218
Issue 16218: Python launcher does not support unicode characters - Python tracker
October 13, 2012 - This issue tracker has been migrated to GitHub, and is currently read-only. For more information, see the GitHub FAQs in the Python's Developer Guide · This issue has been migrated to GitHub: https://github.com/python/cpython/issues/60422
🌐
pytz
pythonhosted.org › kitchen › unicode-frustrations.html
Overcoming frustration: Correctly using unicode in python2 — kitchen 1.2.1 documentation
Anytime you call a function you need to evaluate whether that function will do the right thing with str or unicode values. Sending the wrong value here will lead to a UnicodeError being thrown when the string contains non-ASCII characters. ... There is one mitigating factor here. The python ...