thp / urlwatch

Watch (parts of) webpages and get notified when something changes via e-mail, on your phone or via other means. Highly configurable.
https://thp.io/2008/urlwatch/
Other
2.82k stars 351 forks source link

Randomly "not enough values to unpack" Python errors #799

Closed mhalano closed 7 months ago

mhalano commented 7 months ago

I got this errors randomly, and for multiple entrie, not just this one. Here is all the error:

ERROR: Widevine availble on Ubuntu Ports ( http://ports.ubuntu.com/pool/multiverse/w/ )
---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mhalano/.local/lib/python3.12/site-packages/urlwatch/handler.py", line 106, in process
    self.load()
  File "/home/mhalano/.local/lib/python3.12/site-packages/urlwatch/handler.py", line 85, in load
    self.old_data, self.timestamp, self.tries, self.etag = self.cache_storage.load(self.job, guid)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mhalano/.local/lib/python3.12/site-packages/urlwatch/storage.py", line 572, in load
    for data, timestamp, tries, etag in CacheEntry.query(self.db,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 4, got 0)

This is the configuration for this entry:

name: 'Widevine availble on Ubuntu Ports'
url: 'http://ports.ubuntu.com/pool/multiverse/w/'
filter:
  - html2text:
  - grep: 'widevine'
  - striplines:

I built a wheel file that I installed with pip3 from commit e7a4d004425bdb275201ec5af45b24ac8c8d1946.

mhalano commented 7 months ago

I'm using Python 3.12.

bb6 commented 7 months ago

For what it's worth, nearly identical error's have been previously reported under Issue 779 - Reporting blanks.

Jamstah commented 7 months ago

How are you triggering urlwatch?

Is there a possibility you are running two instances at the same time?

Random errors are hard to debug, and finding a way to reproduce the problem is important here.

mhalano commented 7 months ago

@Jamstah I was using cron, but since I configured to get emails and these emails came with the errors, I'm running manually for some time just to check the changes. I will close this issue. The problem is equal to #779