<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx-reuseport/1.21.1</center>
</body>
</html>
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Program Files\Python310\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Program Files\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\User\Desktop\test\test3.py", line 20, in
data = response.json()
File "C:\Program Files\Python310\lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
select id, avg(rate) rate
from users u
left join replies r on r.user_id = u.id
group by u.name
order by rate desc LIMIT 0, 50
Ответ MySQL: Документация
#1052 - Столбец 'id' в field list задан неоднозначно
class filter
{
function check($name,$type,$filter,$options = null) {
if ($type == 'get') {
$type = INPUT_GET;
} else if ($type == 'post') {
$type = INPUT_POST;
} else {
return false;
}
if ($filter == 'email') {
$filter = FILTER_VALIDATE_EMAIL;
$options = null;
} else if ($filter == 'float') {
$filter = FILTER_VALIDATE_FLOAT;
$options = null;
} else if ($filter == 'int') {
$filter = FILTER_VALIDATE_INT;
if (isset($options['min']) and isset($options['max'])) {
$options = array("options" => array("min_range" => $options['min'], "max_range" => $options['max']));
} else {
$options = null;
}
} else if ($filter == 'url') {
$filter = FILTER_VALIDATE_URL;
$options = null;
} else if ($filter == 'regexp') {
$filter = FILTER_VALIDATE_REGEXP;
if (empty($options)) {
return false;
} else {
$options = array("options" => array("regexp" => $options));
}
} else {
return false;
}
$value = filter_input($type, $name, $filter, $options);
return $value;
}
}
$check_values->check('domain','post','regexp','~^[a-zа-яё0-9-]{3,30}\.[a-zа-яё]{2,10}$~')