[bug] ValueError: filedescriptor out of range in select()

Steps to reproduce:

  1. Import 10 decks
Anki 26.09 (e62e7739)
Python 3.14.7 Qt 6.11.2 PyQt 6.11.0
Platform: Linux-7.2.5-1-cachyos-x86_64-with-glibc2.44

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.14/threading.py", line 1082, in _bootstrap_inner
self._context.run(self.run)
~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/aqt/mediasrv.py", line 223, in run
self.server.run()
~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.14/site-packages/waitress/server.py", line 325, in run
self.asyncore.loop(
~~~~~~~~~~~~~~~~~~^
timeout=self.adj.asyncore_loop_timeout,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
map=self._map,
^^^^^^^^^^^^^^
use_poll=self.adj.asyncore_use_poll,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3.14/site-packages/waitress/wasyncore.py", line 240, in loop
poll_fun(timeout, map)
~~~~~~~~^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/waitress/wasyncore.py", line 167, in poll
r, w, e = select.select(r, w, e, timeout)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
ValueError: filedescriptor out of range in select()
Exception in threading.excepthook:
Exception ignored in thread started by <bound method Thread._bootstrap of <MediaServer(Thread-1, started 140329663592128)>>:
Traceback (most recent call last):
File "/usr/lib/python3.14/threading.py", line 1044, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.14/threading.py", line 1084, in _bootstrap_inner
self._invoke_excepthook(self)
File "/usr/lib/python3.14/threading.py", line 1343, in invoke_excepthook
local_print("Exception in threading.excepthook:",
AttributeError: 'ErrorHandler' object has no attribute 'flush'
Exception ignored in sys.unraisablehook: 
AttributeError: 'ErrorHandler' object has no attribute 'flush'