Коллеги, памагити, что делаю не так? при вводе:
elif message.text == 'баба':
if biznes == 'biznes':
# Создаем клавиатуру
vibor3 = types.ReplyKeyboardMarkup(True, False)
vibor3.row('лолка')
bot.send_message(message.chat.id, 'Естче', reply_markup=vibor3)
elif message.text == 'лолка':
if biznes == 'biznes':
headers = ({
'Content-Type': 'application/json-rpc',
}
)
data = '\n{\n "jsonrpc": "2.0",\n "method": "map.create",\n "params": {\n "name": "555555",\n "width": 600,\n "height": 600\n },\n "auth": "0737598уу0090ac0c92cbea5$
response = requests.post('http://localhost/zabbix/api_jsonrpc.php', headers=headers, data=data)
bot.polling()
message.chat.id, 'Естче', reply_markup=vibor3)
elif message.text == 'лолка':
if biznes == 'biznes':
headers = ({
'Content-Type': 'application/json-rpc',
}
)
data = '\n{\n "jsonrpc": "2.0",\n "method": "map.create",\n "params": {\n "name": "555555",\n "width": 600,\n "height": 600\n },\n "auth": "0737598уу0090ac0c92cbea5$
response =
requests.post('http://localhost/zabbix/api_jsonrpc.php', headers=headers, data=data)
bot.polling()
получаю ошибку
Traceback (most recent call last):
File "telegram.py", line 57, in <module>
response = requests.post('http://localhost/zabbix/api_jsonrpc.php', headers=headers, data=data)
NameError: name 'headers' is not definedtelegram.py", line 57, in <module>
response =
requests.post('http://localhost/zabbix/api_jsonrpc.php', headers=headers, data=data)
NameError: name 'headers' is not defined