Issue #18010: Fix pydoc GUI search to handle package exceptions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index d7396f0..9316fff 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -2244,8 +2244,11 @@
             if self.scanner:
                 self.scanner.quit = 1
             self.scanner = ModuleScanner()
+            def onerror(modname):
+                pass
             threading.Thread(target=self.scanner.run,
-                             args=(self.update, key, self.done)).start()
+                             args=(self.update, key, self.done),
+                             kwargs=dict(onerror=onerror)).start()
 
         def update(self, path, modname, desc):
             if modname[-9:] == '.__init__':
diff --git a/Misc/NEWS b/Misc/NEWS
index c9dbb46..6f056b2 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -46,6 +46,9 @@
 Library
 -------
 
+- Issue #18010: Fix the pydoc GUI's search function to handle exceptions
+  from importing packages.
+
 - Issue #25515: Always use os.urandom as a source of randomness in uuid.uuid4.
 
 - Issue #21827: Fixed textwrap.dedent() for the case when largest common