| KeyError | Python 3.9.21: /usr/bin/python Sat Oct 25 17:22:22 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.
| /var/www/cgi-bin-mlpronto/MLpronto_random.cgi in <module> |
| 83 php('header.html', '$path1="../";') |
| 84 removeOldResults() # Remove old files |
| => 85 err1, IP, date, size = validateInput(form) # Check IP address, file size, and parameter types. |
| 86 parameters = getFormParameters(form) |
| 87 checksum, extension, name_of_file = generateFileNameAndUpdateParameters(parameters) |
| err1 undefined, IP undefined, date undefined, size undefined, validateInput = <function validateInput>, form = FieldStorage(None, None, []) |
| /var/www/cgi-bin-mlpronto/MLpronto_utils.py in validateInput(form=FieldStorage(None, None, [])) |
| 121 IP = os.environ['REMOTE_ADDR'] |
| 122 date = time.asctime() |
| => 123 size = int(os.environ['CONTENT_LENGTH']) |
| 124 count = 0 |
| 125 with open(LOG_FILE, 'r') as in_file: |
| size undefined, builtin int = <class 'int'>, global os = <module 'os' from '/usr/lib64/python3.9/os.py'>, os.environ = environ({'PATH': '/usr/local/bin:/usr/bin:/bin',...TE_LIB_OK': 'True', 'KMP_INIT_AT_FORK': 'FALSE'}) |
| /usr/lib64/python3.9/os.py in __getitem__(self=environ({'PATH': '/usr/local/bin:/usr/bin:/bin',...TE_LIB_OK': 'True', 'KMP_INIT_AT_FORK': 'FALSE'}), key='CONTENT_LENGTH') |
| 677 except KeyError: |
| 678 # raise KeyError with the original key value |
| => 679 raise KeyError(key) from None |
| 680 return self.decodevalue(value) |
| 681 |
| builtin KeyError = <class 'KeyError'>, key = 'CONTENT_LENGTH' |
KeyError: 'CONTENT_LENGTH'
args =
('CONTENT_LENGTH',)
with_traceback =
<built-in method with_traceback of KeyError object>