Closed aneels3 closed 3 years ago
Hi @aneels3, After a bit of digging, I was able to reproduce the problem (I wanted to ensure I had a test that would trigger this). The most immediate cause of the problem is some diagnostic code that made an incorrect assumption about the API implemented by all fields. I've corrected this issue, and will update the release version later today. So, you're correct with your fix to add a default to the 'level' parameter. As you note, this does result in a solve failure. It's possible this results from the changes to support solve ordering. I do see that your inline constraint uses regular Python procedural if/then statements. It's possible that using these instead of constraint if/then statements (eg vsc.if_then) could cause the problem. Do try catching the SolveFail exception and displaying it. Solve-fail diagnostics are still being developed, but sometimes they can help. Have a look at this test: https://github.com/fvutils/pyvsc/blob/ac2728ac183bae7c2de80d26b77d27f155197833/ve/unit/test_solve_failure.py#L36-L41
Best Regards, Matthew
Hi @mballance Thanks for the quick support on this issue. It's working as expected now. closing the issue for now. If I find any issue related to this in the future, I will reopen it.
Regards, Anil
Hi @mballance Thanks for the new release which is working well for randcase and std::randomization().
I am facing some issue with inline randomization in the new release. Previously I have implemented inline randomization like this and it was working well with the previous release i.e 0.2.3.20201006.1.
The above particular code is working in a random fashion in the new release. Here is the console message for the failure case.
I tried to debug with the pyvsc source files and provided the positional argument level value as 0. but this doesn't solve the issue, Instead of a level issue, there was a multiple constraint failure. I am assuming this is not the expected solution to this problem.
I am in a confusion whether the new release alters the behaviour of inline randomization or there is some issue with my implemented code. Can you give me some pointer on this?
Regards, Anil