NITDgpOS / UIP

A library, to customize your desktop wallpapers.
https://nitdgpos.github.io/projects/UIP
GNU Affero General Public License v3.0
19 stars 45 forks source link

UIP command throws this error after building the source #338

Closed SACHIN-13 closed 7 years ago

SACHIN-13 commented 7 years ago
Traceback (most recent call last):
  File "/usr/lib/python3.5/random.py", line 253, in choice
    i = self._randbelow(len(seq))
  File "/usr/lib/python3.5/random.py", line 230, in _randbelow
    r = getrandbits(k)          # 0 <= r < 2**k
ValueError: number of bits must be greater than zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/UIP", line 9, in <module>
    load_entry_point('UIP==0.0.3', 'console_scripts', 'UIP')()
  File "/usr/local/lib/python3.5/dist-packages/UIP-0.0.3-py3.5.egg/uiplib/UIP.py", line 67, in main
  File "/usr/local/lib/python3.5/dist-packages/UIP-0.0.3-py3.5.egg/uiplib/scheduler.py", line 36, in __init__
  File "/usr/local/lib/python3.5/dist-packages/UIP-0.0.3-py3.5.egg/uiplib/scheduler.py", line 113, in run
  File "/usr/local/lib/python3.5/dist-packages/UIP-0.0.3-py3.5.egg/uiplib/scheduler.py", line 40, in change_random
  File "/usr/lib/python3.5/random.py", line 255, in choice
    raise IndexError('Cannot choose from an empty sequence')
IndexError: Cannot choose from an empty sequence
abhay-raizada commented 7 years ago

happens due to != instead of == in line 107 in scheduler.py

SACHIN-13 commented 7 years ago

would like to fix it!

abhay-raizada commented 7 years ago

@SACHIN-13 sure go ahead! :D send in a PR!