Ошибка:
2022-07-31T19:32:30.773398+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/aiogram/bot/api.py", line 140, in make_request
2022-07-31T19:32:30.773399+00:00 app[web.1]: return check_result(method, response.content_type, response.status, await response.text())
2022-07-31T19:32:30.773399+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/aiogram/bot/api.py", line 115, in check_result
2022-07-31T19:32:30.773399+00:00 app[web.1]: exceptions.BadRequest.detect(description)
2022-07-31T19:32:30.773399+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.8/site-packages/aiogram/utils/exceptions.py", line 141, in detect
2022-07-31T19:32:30.773399+00:00 app[web.1]: raise cls(description)
2022-07-31T19:32:30.773399+00:00 app[web.1]: aiogram.utils.exceptions.BadRequest: Wrong remote file identifier specified: wrong character in the string
Код
async def sql_start():
if base:
print ('Я подключился!')
cur.execute (
"""CREATE TABLE IF NOT EXISTS memcfc(
photo TEXT NOT NULL,
name varchar (100) PRIMARY KEY,
discription TEXT NOT NULL);"""
)
base.cursor()
async def add_sql_command(state):
try:
async with state.proxy() as data:
cur.execute(
"""INSERT INTO memcfc (photo , name , discription) VALUES
(' ? ',' ? ',' ? '); """ , tuple(data.values()))
except errors.lookup(UNIQUE_VIOLATION) as e:
print (e)
async def sql_read(message):
cur.execute('SELECT * FROM memcfc')
for ret in cur.fetchall():
await bot.send_photo(message.from_user.id , ret[0], f'{ret[1]}\nОписание:\n{ret[2]}\nНадеюсь вам понравилось воспоминание!')
PS:В sqlite3 этот код работал ,перешёл на Postgres для хостинга и в итоге он мне не отправляет данные