Traceback (most recent call last):
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\dispatcher.py", line 425, in process_update
handler.handle_update(update, self, check, context)
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\handler.py", line 145, in handle_update
return self.callback(update, context)
File "C:\Users\home\PycharmProjects\витрина1\main.py", line 76, in button_callback
conn.close()
UnboundLocalError: local variable 'conn' referenced before assignment
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\dispatcher.py", line 425, in process_update
handler.handle_update(update, self, check, context)
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\handler.py", line 145, in handle_update
return self.callback(update, context)
File "C:\Users\home\PycharmProjects\витрина1\main.py", line 76, in button_callback
conn.close()
UnboundLocalError: local variable 'conn' referenced before assignment
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\dispatcher.py", line 425, in process_update
handler.handle_update(update, self, check, context)
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\handler.py", line 145, in handle_update
return self.callback(update, context)
File "C:\Users\home\PycharmProjects\витрина1\main.py", line 76, in button_callback
conn.close()
UnboundLocalError: local variable 'conn' referenced before assignment
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\dispatcher.py", line 425, in process_update
handler.handle_update(update, self, check, context)
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\handler.py", line 145, in handle_update
return self.callback(update, context)
File "C:\Users\home\PycharmProjects\витрина1\main.py", line 76, in button_callback
conn.close()
UnboundLocalError: local variable 'conn' referenced before assignment
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\dispatcher.py", line 425, in process_update
handler.handle_update(update, self, check, context)
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\handler.py", line 145, in handle_update
return self.callback(update, context)
File "C:\Users\home\PycharmProjects\витрина1\main.py", line 65, in button_callback
_, name, size, info, price, photo_link = item
ValueError: not enough values to unpack (expected 6, got 5)
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\dispatcher.py", line 425, in process_update
handler.handle_update(update, self, check, context)
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\handler.py", line 145, in handle_update
return self.callback(update, context)
File "C:\Users\home\PycharmProjects\витрина1\main.py", line 76, in button_callback
conn.close()
UnboundLocalError: local variable 'conn' referenced before assignment
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\dispatcher.py", line 425, in process_update
handler.handle_update(update, self, check, context)
File "C:\Users\home\PycharmProjects\витрина1\venv\lib\site-packages\telegram\ext\handler.py", line 145, in handle_update
return self.callback(update, context)
File "C:\Users\home\PycharmProjects\витрина1\main.py", line 76, in button_callback
conn.close()
UnboundLocalError: local variable 'conn' referenced before assignment
в коде
import os
import sqlite3
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update
from telegram.ext import CommandHandler, CallbackQueryHandler, CallbackContext, Filters, MessageHandler, Updater