--> -->
KeyError | Python 3.8.10: /usr/bin/python3 Fri Jun 7 11:45:11 2024 |
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/html/dev.py in <module> |
1289
|
1290
|
=> 1291 if response.headers['Content-Type'] != 'image/png':
|
1292 #server_status='<div style=\"height:0;width:18px;padding-bottom:18px;background-color:#AA0000\"></DIV>'
|
1293 server_status='<div style=\"height:0;width:18px;padding-bottom:28px;\"><img SRC=img_design/servicedown.png></DIV>'
|
response = <Response [200]>, response.headers = {'Server': 'nginx', 'Date': 'Fri, 07 Jun 2024 11... 'Strict-Transport-Security': 'max-age=63072000'} |
/usr/lib/python3/dist-packages/requests/structures.py in __getitem__(self={'Server': 'nginx', 'Date': 'Fri, 07 Jun 2024 11... 'Strict-Transport-Security': 'max-age=63072000'}, key='Content-Type') |
50
|
51 def __getitem__(self, key):
|
=> 52 return self._store[key.lower()][1]
|
53
|
54 def __delitem__(self, key):
|
self = {'Server': 'nginx', 'Date': 'Fri, 07 Jun 2024 11... 'Strict-Transport-Security': 'max-age=63072000'}, self._store = OrderedDict([('server', ('Server', 'nginx')), ('...trict-Transport-Security', 'max-age=63072000'))]), key = 'Content-Type', key.lower = <built-in method lower of str object> |
KeyError: 'content-type'
args =
('content-type',)
with_traceback =
<built-in method with_traceback of KeyError object>