#i need your help my random.py module is showing an error

1 messages · Page 1 of 1 (latest)

drowsy herald
#

Do you know how randrange works?

lofty bridge
#

random.py", line 319, in randrange
raise ValueError(f"empty range in randrange({start}, {stop})")
😄

winged karma
#

i know how it works but the thing is that the event that uses the function works fine 1 or 2 times on a single run and then this error occers

drowsy herald
#

Are you sure you know how it works?

lofty bridge
#

randrange returns a list if im not wrong

winged karma
#

well yes better then most modules

lofty bridge
#

(tuple)

#

tell me what should that method return you?

drowsy herald
winged karma
#

the start is the minimum and stop-1 is the maximum range

drowsy herald
#

So if start is 1, and stop is 1

#

What are the possible values?

lofty bridge
#

[1] xD

drowsy herald
winged karma
#

oh so thats it it has no value

drowsy herald
#

Sometimes you need to read the error message