rconradharris / reddit-background

Set your Linux and Mac OS X desktop background to images pulled from Reddit
101 stars 17 forks source link

"ZeroDivisionError: float division by zero" on first run #28

Closed vitovalov closed 7 years ago

vitovalov commented 7 years ago

Hi, thanks for the nice script.

When I tried to run it for the first time, I got this:

⇒  ./reddit-background
Traceback (most recent call last):
  File "./reddit-background", line 791, in <module>
    main()
  File "./reddit-background", line 785, in main
    paths = desktop.fetch_backgrounds(1)
  File "./reddit-background", line 424, in fetch_backgrounds
    chooser.sort()
  File "./reddit-background", line 349, in sort
    image, log_lo_score, log_hi_score))
  File "./reddit-background", line 256, in _score_reddit_score
    score = float(log_score - log_lo_score) / (log_hi_score - log_lo_score)
ZeroDivisionError: float division by zero

Then I created a .conf file in ~ and used the download_only example. That works fine.

System: OS X 10.12.5 Python 2.7.13