Message3764

Author marcdownie
Recipients marcdownie
Date 2008-11-09.01:39:06
SpamBayes Score 1.6161912e-06
Marked as misclassified No
Message-id <1226194747.79.0.514293900229.issue1167@psf.upfronthosting.co.za>
In-reply-to
Content
Importing random fails with the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File 
"/Users/marc/fieldwork/field/distribution/application/field.app/Contents
/Resources/Java/../../../../../../development/depends/jython2.5b0/Lib/ra
ndom.py", line 838, in <module>
    _inst = Random()
  File 
"/Users/marc/fieldwork/field/distribution/application/field.app/Contents
/Resources/Java/../../../../../../development/depends/jython2.5b0/Lib/ra
ndom.py", line 94, in __init__
    self.seed(x)
  File 
"/Users/marc/fieldwork/field/distribution/application/field.app/Contents
/Resources/Java/../../../../../../development/depends/jython2.5b0/Lib/ra
ndom.py", line 113, in seed
    super(Random, self).seed(a)
OverflowError: long too big to convert

"Fixing" the line:

super(Random, self).seed(a)

to be:

super(Random, self).seed(1)

gets a new error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File 
"/Users/marc/fieldwork/field/distribution/application/field.app/Contents
/Resources/Java/../../../../../../development/depends/jython2.5b0/Lib/ra
ndom.py", line 861, in <module>
    getrandbits = _inst.getrandbits
AttributeError: 'Random' object has no attribute 'getrandbits'

commenting out the offending assignment gets you an importing random 
package.

Perhaps the symptom of a core bug rather than a library one? I also 
recall using random in 2.5alpha3.
History
Date User Action Args
2008-11-09 01:39:08marcdowniesetrecipients: + marcdownie
2008-11-09 01:39:07marcdowniesetmessageid: <1226194747.79.0.514293900229.issue1167@psf.upfronthosting.co.za>
2008-11-09 01:39:07marcdownielinkissue1167 messages
2008-11-09 01:39:06marcdowniecreate