ValueError |
Python 3.11.2: /usr/bin/python Sun Sep 14 23:20:37 2025 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/usr/lib/python3/dist-packages/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>) |
565 """Runs the handler, flushes the streams, and ends the request.""" |
566 try: |
=> 567 protocolStatus, appStatus = self.server.handler(self) |
568 except: |
569 output = io.StringIO() |
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method BaseFCGIServer.handler of <flup.server.fcgi.WSGIServer object>> |
/usr/lib/python3/dist-packages/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>) |
1129 try: |
1130 try: |
=> 1131 result = self.application(environ, start_response) |
1132 try: |
1133 for data in result: |
result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <function application>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/home/www/public_html/', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/home/www/public_html/', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate', 'HTTP_CACHE_CONTROL': 'max-age=259200', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'petkli.de', ...}, start_response = <function BaseFCGIServer.handler.<locals>.start_response> |
/usr/lib/python3/dist-packages/cm4all/fcgi/launcher.py in application(environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/home/www/public_html/', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/home/www/public_html/', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate', 'HTTP_CACHE_CONTROL': 'max-age=259200', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'petkli.de', ...}, start_response=<function BaseFCGIServer.handler.<locals>.start_response>) |
15 |
16 def application(environ, start_response): |
=> 17 return cache[environ['SCRIPT_FILENAME']](environ, start_response) |
18 |
19 def launch(): |
global cache = {}, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/home/www/public_html/', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/home/www/public_html/', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip, br, zstd, deflate', 'HTTP_CACHE_CONTROL': 'max-age=259200', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'petkli.de', ...}, start_response = <function BaseFCGIServer.handler.<locals>.start_response> |
/usr/lib/python3/dist-packages/cm4all/fcgi/launcher.py in __missing__(self={}, path='/home/www/public_html/python3/dist-packages/psutil/tests/__pycache__/test_contracts.cpython-311.pyc') |
6 name, ext = os.path.splitext(os.path.split(path)[-1]) |
7 if ext in ('.pyc', '.py3c'): |
=> 8 mod = imp.load_compiled(name, path) |
9 else: |
10 mod = imp.load_source(name, path) |
mod undefined, global imp = <module 'imp' from '/usr/lib/python3.11/imp.py'>, imp.load_compiled = <function load_compiled>, name = 'test_contracts.cpython-311', path = '/home/www/public_html/python3/dist-packages/psutil/tests/__pycache__/test_contracts.cpython-311.pyc' |
/usr/lib/python3.11/imp.py in load_compiled(name='test_contracts.cpython-311', pathname='/home/www/public_html/python3/dist-packages/psutil/tests/__pycache__/test_contracts.cpython-311.pyc', file=None) |
190 module = _exec(spec, sys.modules[name]) |
191 else: |
=> 192 module = _load(spec) |
193 # To allow reloading to potentially work, use a non-hacked loader which |
194 # won't rely on a now-closed file object. |
module undefined, global _load = <function _load>, spec = ModuleSpec(name='test_contracts.cpython-311', lo...ests/__pycache__/test_contracts.cpython-311.pyc') |
/usr/bin/<frozen importlib._bootstrap> in _load(spec=ModuleSpec(name='test_contracts.cpython-311', lo...ests/__pycache__/test_contracts.cpython-311.pyc')) |
/usr/bin/<frozen importlib._bootstrap> in _load_unlocked(spec=ModuleSpec(name='test_contracts.cpython-311', lo...ests/__pycache__/test_contracts.cpython-311.pyc')) |
/usr/bin/<frozen importlib._bootstrap_external> in exec_module(self=<imp._LoadCompiledCompatibility object>, module=<module 'test_contracts.cpython-311' from '/home...ests/__pycache__/test_contracts.cpython-311.pyc'>) |
/usr/bin/<frozen importlib._bootstrap> in _call_with_frames_removed(f=<built-in function exec>, *args=(<code object <module> at 0x7f6414304a70, file "/...packages/psutil/tests/test_contracts.py", line 1>, {'AIX': False, 'BSD': False, 'FREEBSD': False, 'LINUX': True, 'MACOS': False, 'NETBSD': False, 'OPENBSD': False, 'OSX': False, 'POSIX': True, 'SUNOS': False, ...}), **kwds={}) |
/home/www/public_html/python3/dist-packages/psutil/tests/test_contracts.py in <module> |
30 from psutil import WINDOWS |
31 from psutil._compat import long |
=> 32 from psutil.tests import bind_unix_socket |
33 from psutil.tests import check_connection_ntuple |
34 from psutil.tests import get_kernel_version |
psutil undefined, bind_unix_socket undefined |
/usr/lib/python3/dist-packages/psutil/tests/__init__.py in <module> |
1816 # gets sent to test subprocesses, which is a problem if they import this |
1817 # module. With this it will. See: |
1818 # https://gmpy.dev/blog/2016/how-to-always-execute-exit-functions-in-python |
1819 if POSIX: |
=> 1820 signal.signal(signal.SIGTERM, lambda sig, frame: sys.exit(sig)) |
signal = <module 'signal' from '/usr/lib/python3.11/signal.py'>, signal.signal = <function signal>, signal.SIGTERM = <Signals.SIGTERM: 15>, sig undefined, frame undefined, sys = <module 'sys' (built-in)>, sys.exit = <built-in function exit> |
/usr/lib/python3.11/signal.py in signal(signalnum=<Signals.SIGTERM: 15>, handler=<function <lambda>>) |
54 @_wraps(_signal.signal) |
55 def signal(signalnum, handler): |
=> 56 handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) |
57 return _int_to_enum(handler, Handlers) |
58 |
handler = <function <lambda>>, global _signal = <module '_signal' (built-in)>, _signal.signal = <built-in function signal>, global _enum_to_int = <function _enum_to_int>, signalnum = <Signals.SIGTERM: 15> |
ValueError: signal only works in main thread of the main interpreter
add_note =
<built-in method add_note of ValueError object>
args =
('signal only works in main thread of the main interpreter',)
with_traceback =
<built-in method with_traceback of ValueError object>