[ python-Bugs-919014 ] Error with random module

SourceForge.net noreply at sourceforge.net
Fri Mar 19 01:54:09 EST 2004


Bugs item #919014, was opened at 2004-03-18 14:33
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=919014&group_id=5470

Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Gaëtan (herlockg)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Error with random module

Initial Comment:
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.




----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-03-19 01:54

Message:
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=919014&group_id=5470



More information about the Python-bugs-list mailing list