Closed aneels3 closed 3 years ago
Hi @mballance Did you get a chance to look into this?
Hi @aneels3, Just got a chance. The issue results because of the operator overloading that PyVSC uses to make it easy to get values from scalar fields in the user's Python code. When 'randomize_with' is called, it is passed the value of the 'value' field, and not a reference to the field object. There are two things you can do here:
Randomize the containing object instead:
with vsc.randomize_with(self):
self.value in ...
Surround the randomize call with a 'raw_mode()' to turn off the operator overloading
with vsc.raw_mode():
with vsc.randomize_with(self.value):
...
Please note that you'll need to remove the 'hex' calls in the calls to 'task'. These convert the integer to a string, causing a different failure.
Best Regards, Matthew
Hi @mballance This is working fine now. Thanks for the help.
Hi @mballance I am trying to implement randselect case like below
I am getting the below error while executing
Can you look into it?
Thanks and regards, Anil