[INFO] Solving using legacy API

Flask always gives a message like
[INFO] Solving using legacy API: <HopsComponent /nca [seed,steps -> NCA -> nstep,colors]
Is there a more current API that I haven’t discovered?


What does your url look like in your hops component?

That is coming from here in the ghhops server code

My hops path is , I copied the url from the Flask output as in the Connecting Hops to CPython video.
Is there later documentation I should be looking at?

I’m not exactly sure. It doesn’t look like one technique really works any better than another. @eirannejad do you remember what we were trying to do here?

Hi Steve,

Suddenly, I have the same issue
[INFO] Solving using legacy API: …

and the hops become super slow. I have tried to restart my computer, but still not going anywhere.

I used Hops 0.15.5

We’ll need some more details to be able to help.

Oddly, I’ve just encountered the same issue with a new example install.

I am simply replicating the tutorial (python 3.8, fresh ghhops-server, rhino3dm and flask install) application’s pointat route.

legacy API error.txt (2.9 KB)

Perhaps relatedly, I encountered this error (4x) when starting grasshopper:

Grasshopper Archive messages
Object 'Hops' {c69bb52c-88ba-4640-b69f-188d111029e8} failed to deserialize itself: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

Update: My (and perhaps everyone’s) version of this issue is from a index error in ghhops-server.params, see linked thread:

My error when starting grasshopper was only from that file, and I believe unrelated.

Did this issue get resolved or do we still need to make modifications to the github repo?

Curiously, I found this dependent on the python version.

I just tested the tutorial points_at route with windows, pip==23.1.2 and python versions 3.8.0, 3.9.12, 3.10.5, and 3.11.1. For python 3.8 and 3.10.5, ghhops-server (v1.5.5) worked without issue, while for python 3.9.12 and 3.11.1 rhino3dm (v7.15.0) could not install. (cmake error)

  RuntimeError: The command "cmake --build . --config Release --target _rhino3dm" exited with 1

followed by

Failed to build rhino3dm
ERROR: Could not build wheels for rhino3dm, which is required to install pyproject.toml-based projects

which is what I would expect for py3.11; the rhino3dm package is explicitly incompatible at present. However, I know that I’ve run ghhops-server with python 3.9 previously, and had to make the associated adjustment. In truth, I’m confused.

TLDR: Using python 3.10.5, and pip install flask ghhops-server works without issue, so I’d say it’s fine.