Skip to content

Preprocess Text cannot work #759

Description

@Hui-Eva

What's wrong?

When I use Preprocess Text, it cannot work suddenly. I have tried uninstalling and installing. Thank you for your help

And here is the warning:

Traceback (most recent call last):
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangecanvas/scheme/widgetmanager.py", line 236, in __add_widget_for_node
w = self.create_widget_for_node(node)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangewidget/workflow/widgetsscheme.py", line 300, in create_widget_for_node
widget = self.create_widget_instance(node)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangewidget/workflow/widgetsscheme.py", line 413, in create_widget_instance
widget.init()
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangecontrib/text/widgets/owpreprocess.py", line 1014, in init
Orange.widgets.data.owpreprocess.OWPreprocess.init(self)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Orange/widgets/data/owpreprocess.py", line 1162, in init
self._initialize()
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Orange/widgets/data/owpreprocess.py", line 1182, in _initialize
self.set_model(model)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Orange/widgets/data/owpreprocess.py", line 1262, in set_model
self.controler.setModel(ppmodel)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Orange/widgets/data/utils/preprocess.py", line 265, in setModel
self._initialize(model)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Orange/widgets/data/utils/preprocess.py", line 276, in _initialize
self._insertWidgetFor(i, index)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Orange/widgets/data/utils/preprocess.py", line 398, in _insertWidgetFor
widget = self.createWidgetFor(index)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Orange/widgets/data/utils/preprocess.py", line 415, in createWidgetFor
widget = definition.viewclass()
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangecontrib/text/widgets/owpreprocess.py", line 566, in init
self, [_DEFAULT_NONE] + StopwordsFilter.supported_languages(),
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangecontrib/text/misc/nltk_data_download.py", line 55, in wrapper
return func(*args, **kwargs)
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangecontrib/text/preprocess/filter.py", line 93, in supported_languages
os.listdir(stopwords._get_root())
TypeError: listdir: path should be string, bytes, os.PathLike or None, not ZipFilePathPointer

How can we reproduce the problem?

What's your environment?

  • Operating system:
  • Orange version:
  • How you installed Orange:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions