31 July 2025
Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
Connection failed! Trying again...
Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
Connection failed! Trying again...
Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
.Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
Unable to connect due to network issues: [WinError 1225] The remote computer refu
sed the network connection
Unable to connect due to network issues: [WinError 1225] The remote computer refu
چی شده
بچها کدوم کد بهینه تره برا دیتابیس
میخوام خطایی اگه داد برام تل ارسال بشه برا همین از اسینک استفاده کردم ولی اگه از loop استفاده کنم نمیشه خطا رو به تل ارسال کرد و فقط میشه پرینتش کرد
کد یک 1
def create_table():
with sqlite3.connect('data.db') as db:
db.execute('''
CREATE TABLE IF NOT EXISTS Table (
id INTEGER PRIMARY KEY AUTOINCREMENT,
Qu1 TEXT,
An1 TEXT
)
''')
db.commit()
if text == 5 : loop = asyncio.get_event_loop()
await loop.run_in_executor(None, Add_Qu.create_table)
کد 2
python
async def create_table():
try :
with sqlite3.connect('data.db') as db:
db.execute('''
CREATE TABLE IF NOT EXISTS Table (
id INTEGER PRIMARY KEY AUTOINCREMENT,
Qu1 TEXT,
An1 TEXT
)
''')
db.commit()
except :
await app.send_message(554544444 , 'error in create table !')
if text == 1 :
add = Add_Qu()
await add.create_table()
𝐄𝐑𝐑𝐎𝐑 503 ! ! 05:32:00بچها کدوم کد بهینه تره برا دیتابیس
میخوام خطایی اگه داد برام تل ارسال بشه برا همین از اسینک استفاده کردم ولی اگه از loop استفاده کنم نمیشه خطا رو به تل ارسال کرد و فقط میشه پرینتش کرد
کد یک 1
def create_table():
with sqlite3.connect('data.db') as db:
db.execute('''
از aiosqlite استفاده کن بجا sqlite3