Skip errors

This commit is contained in:
Watchful1 2025-07-24 21:14:57 -07:00
parent 18e36b1b81
commit a303ade2f7
2 changed files with 4 additions and 3 deletions

View file

@ -347,7 +347,7 @@ if __name__ == '__main__':
field_counts[field] = int(count) field_counts[field] = int(count)
except Exception as err: except Exception as err:
log.info(f"Line failed in file {file.count_file_path}: {line}") log.info(f"Line failed in file {file.count_file_path}: {line}")
raise continue
sorted_counts = sorted(field_counts.items(), key=lambda item: item[1], reverse=True) sorted_counts = sorted(field_counts.items(), key=lambda item: item[1], reverse=True)

View file

@ -15,8 +15,9 @@ import json
# the script will look for both comments and submissions files for each subreddit # the script will look for both comments and submissions files for each subreddit
folder = r"\\MYCLOUDPR4100\Public\reddit\subreddits24" folder = r"\\MYCLOUDPR4100\Public\reddit\subreddits24"
subreddits_string = """ subreddits_string = """
fragranceswap Porsche
MTB orchids
Watches
""" """
ignored_users = {'[deleted]', 'automoderator'} ignored_users = {'[deleted]', 'automoderator'}
# this is a list of users to ignore when doing the comparison. Most popular bots post in many subreddits and aren't the person you're looking for # this is a list of users to ignore when doing the comparison. Most popular bots post in many subreddits and aren't the person you're looking for