I would need to see your entire script to know what the problem is. It sounds like you are assigning another object to the name
random. Please post the entire script. Also, try adding the following code before the line where accessing
random.choice fails: