random.seed() vs R21
brasco last edited by
Can anyone confirm random.seed() is throwing an error in R21?
Cairyn last edited by
Nope. Same commands work fine here (R21.022)
zipit last edited by zipit
I cannot reproduce this neither. The interesting question would be what does
print random.seedfor you and is this reproduceable on your end?
My suspicion would be that someone or something treated
random.seed()like a property instead of like a function, which then led to - with all the "Python functions are first class objects" thing -
random.seedbeing an integer. Something like this:
>>> import random >>> print(random.seed) <bound method Random.seed of <random.Random object at 0x103b62218>> >>> random.seed(12345) >>> random.seed = 12345 # 'accidently' treating it like a property >>> print(random.seed) 12345 >>> random.seed(12345) Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: 'int' object is not callable
m_magalhaes last edited by
I couldn't reproduce this neither.
As @zipit said in his last post, this could explain why you have this message.
But relaunching cinema4D would reset everything.
brasco last edited by brasco
@zipit Thanks for the insight! This makes sense, I vaguely recall typo-ing random.seed and forgetting the () and it threw an error so I fixed that, went writing more of the code and then didn't relate this error back to that brief moment. I don't recall assigning it as a property, but I do have a seed = 12345 elsewhere in the code, so maybe I did!
Thanks all for sanity-checking it, solved.