I’m working on a pretty straightforward script that requires the use of the random() function from python’s random.py library. When I try to run the script, I get the following execution error:
Message: sequence item 0: expected bytes or byte array, str found Traceback: line 160, in <module>, "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py" line 49, in <module>, "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py" line 2, in <module>, "/Users/peter/Library/Application Support/McNeel/Rhinoceros/Scripts/randomfield.py"
line 2, which triggers the error is my simple import declaration
When I remove that no errors until I get to the random.random() call, of course.
I’ve gone back to previous working scripts with random() call in them, and they are all broken now too.
I’ve tried reinstalling python2.7 and that hasn’t changed anything.
Does anyone have any ideas? Or even another library (rhinocommon?) where I might get access to a randomising function so I can bypass random.py altogether.
thanks in advance