Skip to content

Instantly share code, notes, and snippets.

@koreno
Last active February 11, 2021 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koreno/ddd6396d239c658d3f4a98061b913326 to your computer and use it in GitHub Desktop.
Save koreno/ddd6396d239c658d3f4a98061b913326 to your computer and use it in GitHub Desktop.
Traceback Example #1
from easypy.collections import ListCollection
lc = ListCollection()
lc.pop_some(1)
Traceback (most recent call last):
File "./traceback_demo.py", line 7, in <module>
lc.pop_some(1)
File "/home/ofer/Sources/easypy/easypy/collections.py", line 481, in pop_some
sample_size = self._choose_sampling_size(minimum, maximum)
File "/home/ofer/Sources/easypy/easypy/collections.py", line 423, in _choose_sampling_size
return random.randint(minimum, maximum)
File "/usr/lib/python3.8/random.py", line 248, in randint
return self.randrange(a, b+1)
File "/usr/lib/python3.8/random.py", line 226, in randrange
raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (1, 1, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment