FeXd / saskwildfire

A bot to propogate wildfire information in Saskatchewan. https://twitter.com/SaskWildfire
MIT License
1 stars 0 forks source link

FileNotFoundError #9

Open FeXd opened 2 years ago

FeXd commented 2 years ago

Crash from last month.

2022-03-31T11:29:39Z: Error: generate_images_from_pdf! Unable to get page count.
Syntax Warning: May not be a PDF file (continuing anyway)
Syntax Error (2): Illegal character <68> in hex string
Syntax Error (3): Illegal character <74> in hex string
Syntax Error (4): Illegal character <6d> in hex string
Syntax Error (5): Illegal character <6c> in hex string
Syntax Error (8): Illegal character <68> in hex string
Syntax Error (14): Illegal character <74> in hex string
Syntax Error (15): Illegal character <69> in hex string
Syntax Error (16): Illegal character <74> in hex string
Syntax Error (17): Illegal character <6c> in hex string
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table

Traceback (most recent call last):
  File "/Users/arlin/Git/saskwildfire/main.py", line 110, in <module>
    if not os.path.isfile('./image_old/'+item['pdf']+'0.png') or not filecmp.cmp('./image/' + item['pdf'] + '0.png', './image_old/' + item['pdf'] + '0.png', shallow=False):
  File "/Users/arlin/.pyenv/versions/3.9.0/lib/python3.9/filecmp.py", line 52, in cmp
    s1 = _sig(os.stat(f1))
FileNotFoundError: [Errno 2] No such file or directory: './image/today_fwi.pdf0.png
FeXd commented 1 year ago

Happened again

Traceback (most recent call last):
  File "/Users/arlin/Git/saskwildfire/main.py", line 110, in <module>
    if not os.path.isfile('./image_old/'+item['pdf']+'0.png') or not filecmp.cmp('./image/' + item['pdf'] + '0.png', './image_old/' + item['pdf'] + '0.png', shallow=False):
  File "/Users/arlin/.pyenv/versions/3.9.0/lib/python3.9/filecmp.py", line 52, in cmp
    s1 = _sig(os.stat(f1))
FileNotFoundError: [Errno 2] No such file or directory: './image/today_fwi.pdf0.png'