sympy/sympy — pull request #8682 by GitRay (2014-12-22 22:22:07+00:00)
Title: _random: added ValueError to handled exceptions (fixes #8662)

I think this completely resolves the issue, and it does not break any tests. I'm not sure it is the best solution because I'm not overwhelmingly familiar with the codebase. I could have also fixed this by making the _new_args_filter() function in miscellaneous.py throw a TypeError - which _random already handles - instead of a ValueError.