Giter VIP home page Giter VIP logo

Comments (2)

mballance avatar mballance commented on May 26, 2024 1

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:

try:
with it.randomize_with():
it.a == 2
self.fail("Expected a solve failure")
except vsc.SolveFailure as e:
print("Exception: " + str(e))

Best Regards,
Matthew

from pyvsc.

aneels3 avatar aneels3 commented on May 26, 2024

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

from pyvsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.