РС
Size: a a a
РС
VR
VR
🐙
ConnectionWrongStateError: BlockingConnection.close(200, 'Normal shutdown') called on closed connection.
Код и трейсбек по ссылке:🐙
connection_parameters = pika.ConnectionParameters(
host=settings.RABBITMQ_URI,
credentials=credentials,
heartbeat=200,
blocked_connection_timeout=300,
connection_attempts=5,
retry_delay=3
)🐙
р
from tkinter import Messageвот фулл код
from tkinter.constants import N
import telebot
from telebot import types
from os import open
token='TOKEN'
bot=telebot.TeleBot(token)
@bot.message_handler(content_types=['text'])
def get_text_messages(message):
if message.text == "Start":
markup=types.ReplyKeyboardMarkup(resize_keyboard=True)
item1=types.KeyboardButton("Играть")
markup.add(item1)
bot.send_message(message.chat.id,'Выберите что вам нужно:',reply_markup=markup)
if message.text=="Играть":
markup=types.ReplyKeyboardMarkup(resize_keyboard=True)
markup=types.ReplyKeyboardMarkup(resize_keyboard=True)
item1=types.KeyboardButton("Создать комнату")
item2=types.KeyboardButton("Войти в уже существующую комнату")
markup.add(item1)
markup.add(item2)
bot.send_message(message.chat.id,'Выберите что вам нужно:',reply_markup=markup)
if message.text=="Создать комнату":
bot.send_message(message.chat.id,"Введите название вашей комнаты:")
room_name = str(message.text)
r_n = open(room_name, "w+")
bot.polling(none_stop=True, interval=0)
AD