From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by gnuweeb.org (Postfix) with ESMTPS id 6D3DA7E328 for ; Mon, 18 Jul 2022 11:20:51 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=N3WgMTP1; dkim-atps=neutral Received: by mail-pf1-f170.google.com with SMTP id b9so10297971pfp.10 for ; Mon, 18 Jul 2022 04:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2l/7h+y+BSyywptB3ANbxzgU2hgVzRmQHcrFevzJbFo=; b=N3WgMTP18y6p7AY/xvWahi2LfRsmKgTHCeY9YjuCeILJiVeKSx0sbrwd+Po3Gblb/r 49faShgQkIH9fmFEahjt/x3JCfMT8NTgnFlOTjXt5W1jGhXtcQk4O6b0O+T1tNV85gr+ pcam+B1BvunCGBxaxKz+YLgeIQbWlfDJY2pDbc3Zl0UqVVwVGoKLhsAN0EtUWYgUDmw/ B7mDll3chiA30wd0xy00WYp+nIUTndyQ4McEQvYABW870q5AQLMAPQoeHVdmpb+n5B0k iUIjvzKAZVWt0soDgiSgGHqY0JY7rbbmgMuGTH5qRFa0dPuzElvHHLo8Agy0OfhsDURH NoRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2l/7h+y+BSyywptB3ANbxzgU2hgVzRmQHcrFevzJbFo=; b=U/cN5XmNKNolNQI/6RXnO6lGNgDO9KB5cTbYIKUqiH7AdJe/C3mr/pyUkqjr7oCqkp kUsjtOM1j3zY7QcLoAagO6swm1ZyeFOIyA6X5I2pmFEdVMPFakLOebe6k2BF73tPel/v y6S23NgQ6Rr6Gp4ty2Bj1EVtAymHAqtuqc9aIbllHwUYSRfkSwGN0/nIX1oliqNS2Xa/ KAy+c73uB+Lq/uxQEQJ5hcOAnQGWEN5PRmgOuwrVRz2nzZPhkyqP6b2Sv3CidHnyL79b 6lGpzdPnUzgHSUGvsuG7BYZUz8Ncb+tfQMXRhp3bIN/axXORnSzpvbFmKqYVwl+cHEUg 4KLg== X-Gm-Message-State: AJIora95tvA50yUkCnNxypd4rzvZ/CGJxFno/o30dtDh7h+tj3UGGM9k 9kWqd8KYOAL0jic1qs3bJxI= X-Google-Smtp-Source: AGRyM1u+mfw2/kgHNRhTsLZfoKaX+qCO9/x/nIK4lp8UF/v6C6I4zuoiVQSgKEb8tEQ59L8nstrcIQ== X-Received: by 2002:a63:8049:0:b0:414:e8aa:b6bd with SMTP id j70-20020a638049000000b00414e8aab6bdmr24302911pgd.10.1658143250955; Mon, 18 Jul 2022 04:20:50 -0700 (PDT) Received: from localhost.localdomain ([101.128.125.134]) by smtp.gmail.com with ESMTPSA id z14-20020aa7948e000000b0052ad6d627a6sm8991072pfk.166.2022.07.18.04.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 04:20:50 -0700 (PDT) From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , GNU/Weeb Mailing List Subject: [PATCH v1 06/11] Add traceback to get the error detail Date: Mon, 18 Jul 2022 18:20:02 +0700 Message-Id: <20220718112007.792-7-riskimuhammmad1@gmail.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20220718112007.792-1-riskimuhammmad1@gmail.com> References: <20220718112007.792-1-riskimuhammmad1@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Signed-off-by: Muhammad Rizki --- daemon/scraper/bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/scraper/bot.py b/daemon/scraper/bot.py index 04caab6..2392b61 100644 --- a/daemon/scraper/bot.py +++ b/daemon/scraper/bot.py @@ -17,6 +17,7 @@ import pyrogram import asyncio import shutil import re +import traceback class BotMutexes(): @@ -63,8 +64,8 @@ class Bot(): for url in self.ATOM_URLS: try: await self.__handle_atom_url(url) - except Exception as e: - print(f"[__run]: Error: {e}") + except: + print(traceback.format_exc()) if not self.isRunnerFixed: self.isRunnerFixed = True -- Muhammad Rizki