In short, Python's looking in the first file it finds named "random", and isn't finding the choice attribute.
99.99% of the time, that means you've got a file in the path/directory that's already named "random". If that's true, rename it and try again. It should work.