You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Corpus Viewer crashes on bad regex.
------------------------------- error Exception -------------------------------
Traceback (most recent call last):
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangewidget/gui.py", line 993, in returnPressedHandler
self.__callback_if_changed()
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangewidget/gui.py", line 1001, in __callback_if_changed
self.callback()
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangecontrib/text/widgets/owcorpusviewer.py", line 591, in refresh_search
self.doc_list.model().set_filter_string(self.regexp_filter)
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/orangecontrib/text/widgets/owcorpusviewer.py", line 189, in set_filter_string
self.__regex = re.compile(filter_string.strip("|"), re.IGNORECASE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/__init__.py", line 227, in compile
return _compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/__init__.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_compiler.py", line 745, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 989, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 464, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 548, in _parse
code = _escape(source, this, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Orange.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 396, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \u at position 0
-------------------------------------------------------------------------------
To Reproduce
Open Corpus Viewer with any corpus, enter \u in the search box, press Enter.
Expected behavior
A Warning occurs.
Orange version:
3.37.0
Text add-on version:
1.15.0
Operating system:
OSX
The text was updated successfully, but these errors were encountered:
Describe the bug
Corpus Viewer crashes on bad regex.
To Reproduce
Open Corpus Viewer with any corpus, enter
\u
in the search box, press Enter.Expected behavior
A Warning occurs.
Orange version:
3.37.0
Text add-on version:
1.15.0
Operating system:
OSX
The text was updated successfully, but these errors were encountered: