reinterpretcat / vrp

A Vehicle Routing Problem solver
https://reinterpretcat.github.io/vrp/
Apache License 2.0
330 stars 68 forks source link

Pydantic Model Issue #153

Open charlestang06 opened 6 days ago

charlestang06 commented 6 days ago

I am on Win11 running the example.py on Python 3.10.11. I installed vrp_cli, and other requirements as well successfully via PyPI. When running example.py, I am running into this error.

python examples/python-interop/example.py

import pragmatic_types as prg
  File "c:\Users\________\examples\python-interop\pragmatic_types.py", line 146, in <module>
    Problem.__pydantic_model__.update_forward_refs()
AttributeError: type object 'Problem' has no attribute '__pydantic_model__'. Did you mean: '__pydantic_config__'?

What could be the issue here?

reinterpretcat commented 4 days ago

Sorry, cannot say much about it. I have idea to replace this with pyo3 bindings and support extensions written in python natively, but this would require plenty of work. At the moment, I'm refactoring rust code to simplify extension from rust using vrp-core. This I hope to finish soon and make a new release.