MonkeyMaster64/Reddit-User-Media-Downloader-Public

Error thrown by running script on 'empty' account

derwana opened this issue · 0 comments

When running the script on an account without any posted videos or images find_duplicates() throws an error that should be catched.

0
[]
2021-05-25 01:01:00,306: INFO Start: Calculating hashes...
0it [00:00, ?it/s]
2021-05-25 01:01:00,384: INFO End: Calculating hashes!
Traceback (most recent call last):
  File "path/to/Reddit-User-Media-Downloader-Public/reddit-media-downloader.py", line 199, in <module>
    main()
  File "path/to/Reddit-User-Media-Downloader-Public/reddit-media-downloader.py", line 189, in main
    duplicates = phasher.find_duplicates(encoding_map=encodings)
  File "path/to/Reddit-User-Media-Downloader-Public/venv/lib/python3.9/site-packages/imagededup/methods/hashing.py", line 338, in find_duplicates
    raise ValueError('Provide either an image directory or encodings!')
ValueError: Provide either an image directory or encodings!