0

I've tried to do this:

sched = AsyncIOScheduler(timezone='Europe/Moscow')
sched.add_jobstore(SQLAlchemyJobStore(url='sqlite:///ProjectDB.sqlite'))
sched.add_job(create_note, 'interval', seconds=5, kwargs={'bot': bot, 'id':id})

with function:

async def create_note(bot: Bot, id):
    await bot.send_message(chat_id=id, text='some text')

But I got this: TypeError: cannot pickle 'SSLContext' object

eglease
  • 2,445
  • 11
  • 18
  • 28
PR. OR
  • 1
  • 2
  • Also, tried to put `add_job` into message_handler, but got this: `cannot pickle '_asyncio.Future' object` – PR. OR Aug 06 '23 at 17:08

0 Answers0