UNICT-DMI / Telegram-UNICT-Bot

A Telegram Bot for University of Catania

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IndexError: string index out of range

Helias opened this issue · comments

Esito prova di fine corso del 26 maggio 2023, http://www.dei.unict.it//content/esito-prova-di-fine-corso-del-26-maggio-2023?cdl=l-18))
2023-05-31 08:31:35,915 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/unictbot/module/jobs/update_notices.py", line 20, in update_notices_job
    scrape_group(context, group_key, group)
  File "/unictbot/module/scraping/scraper_group.py", line 65, in scrape_group
    notice.send(context, page["channels"])
  File "/unictbot/module/scraping/notice.py", line 148, in send
    chat_id=chat_id, text=self.formatted_message, parse_mode="HTML"
  File "/unictbot/module/scraping/notice.py", line 107, in formatted_message
    return f"<b>[{self.label}]</b>\n{self.url}\n<b>{self.title}</b>\n{self.formatted_content}"
  File "/unictbot/module/scraping/notice.py", line 122, in formatted_content
    while content[split_index] != " ":
IndexError: string index out of range