This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Error with random module
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: herlockg, rhettinger
Priority: normal Keywords:

Created on 2004-03-18 19:33 by herlockg, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg20265 - (view) Author: Gaëtan (herlockg) Date: 2004-03-18 19:33
Hello,

I'm on a Intel Pentium4 3ghz running on Linux (2.4.22)
I have an error when i use the random module

Just with these following lines:
import random
print random.randint(1,10)

I have this error:
Traceback (most recent call last):
  File "plf", line 1, in ?
    import random
  File "/usr/lib/python2.3/random.py", line 4, in ?
    --------
AttributeError: 'module' object has no attribute 'randint'


I don't know what to do, i already recompiled python
with different cflags...

Do you know something about it?

(I'm so sorry for my bad english. I hoop you've
understood me)

Thank you.

Gaëtan.


msg20266 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2004-03-19 06:54
Logged In: YES 
user_id=80475

Your Lib/random.py file is likely damaged.

First, check to see if there is another file named random.py
on your 
search path.  If so, rename it.  If not, get a refreshed
copy of random.py from SF:

http://cvs.sourceforge.net/viewcvs.py/*checkout*/python/python/dist/src/Lib/random.py?content-type=text%2Fplain&rev=1.60
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40047
2004-03-18 19:33:25herlockgcreate