IdealChain / signal-media-exporter

A script to export media files from Signal Desktop.
GNU General Public License v3.0
31 stars 10 forks source link

Skipped non existing at['path'] #1

Closed kir0ul closed 5 years ago

kir0ul commented 5 years ago

I got the following traceback when trying to use your awesome script:

Traceback (most recent call last):                                                                                                                                                                       
  File "export.py", line 191, in <module>                                                                                                                                                                
    msg_stats = save_attachments(config, hashes, *msg)                                                                                                                                                   
  File "export.py", line 111, in save_attachments                                                                                                                                                        
    src = os.path.join(config['signalDir'], 'attachments.noindex', at['path'])                                                                                                                           
KeyError: 'path' 

For some reason I had around 10 at variables with non existing path key, so I added a condition to skip them in case it happens.

IdealChain commented 5 years ago

Nice, thanks for the contribution!