pman07 / Immich_Notify

2 stars 1 forks source link

Back again with another Error #3

Closed feerlessleadr closed 1 year ago

feerlessleadr commented 1 year ago

Hey - I'm back again with another error. I didn't make any chances that I'm aware of, but realized that I wasn't getting notifications. Checked my logs and saw this:

09/29/2023 18:15:01 - Immich Notification Check Triggered
Traceback (most recent call last):
  File "//main.py", line 123, in <module>
    'stored items': total_items_stored[index]}
IndexError: list index out of range
pman07 commented 1 year ago

Do you have debug on?

feerlessleadr commented 1 year ago

Sorry - forgot I turned that off after my last go round. Here you go:

10/03/2023 21:45:01 - Immich Notification Check Triggered
File Exists
Items: 1269
Topic:  immich
Album ID:  79bed5d2-2c71-4dd8-91f7-d06afe496569
Topic:  immich
Album ID:  2531e12f-1e11-4138-9612-721bb58bfd20
Traceback (most recent call last):
  File "//main.py", line 123, in <module>
    'stored items': total_items_stored[index]}
IndexError: list index out of range
pman07 commented 1 year ago

Is the Album with AlbumID '2531e12f-1e11-4138-9612-721bb58bfd20' empty?

-EDIT-

Ahh nevermind. I see my problem, I'm not checking if the number of stored values is equal to the number of albums we're looking up. If you add an album after the initial run, the stored value doesn't exist yet, which causes this error.

Quick fix is to add another line with a value of 0 to your data.txt file or delete your data.txt file and the first scan it will rebuild it including the new album(s), either way.

I'll get something coded up for this case.

pman07 commented 1 year ago

Ok I pushed a fix. Let me know if you have any further issues.

feerlessleadr commented 1 year ago

Thanks so much, that seemed to have fixed it!