Rhino Compute Samples not working

Hi,

I have cloned samples from

but the do not work anymore for me.
i run them locally via python -m SimpleHTTPServer

has there been any significant changes in past year, then they were working just fine. I have some other scripts based of there, and those also do not work either.

best regards,
vladimir

@will can you help here?

Hi, i have realized that i do not have Rhino Compute Server URL, i guess the public server was shut down and oly way forward is to create my own?
rhinoerror2

i wonder if this is a recent thing, as i had one code that worked last week but it does not work from monday,

best regards
vladimir

I would advise against using our compute server. We don’t keep a close eye on it for staying up all of the time and I’m considering just taking it down for good.

ok, thank you for the advice. i will look into own server then,

best regards vladimir

Please note, you should be able to run a copy of rhino.compute on your own computer for development and prototyping.

is there a bit more detailed tutorial how to do that? i am trying to follow
from Running and Debugging Compute Locally with C#, VB

but i am getting this error when i try to run it from visual studio 2019:
image

when i try to “build solution” it says: "========== Build: 0 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
" right after cloning it from github. it feels i am missing something basic as i am not so familiar with VS2019

when i try to “rebuild solution” intead of build i get bunch of errors:

thanks Vladimir

You need to have both .NET 4.8 and .NET 5 to compile this solution. Make sure these are installed with your co-y of Visual Studio.

i have installed both versions of .Net and updated visual studio
I have managed to compile version without errors but when i run i does not load properly, any idea what it is? Semms like something with Vray installation?

thanks,
vladimir

Try disabling VRay in Rhino and try again. Some plug-ins don’t play well when Rhino is running headless. I don’t know if VRay is one, but it is worth a try.

If we verify that VRay is problematic when Rhino is running headless, we can probably add some code to make sure it doesn’t load in this condition.

Hi again,

i think we are getting closer now.

To report the Vray was some older version 3,60 that migrated automatically from rhino 6 to 7, and then it was not possible to uninstall it. However i still got error on loading grasshopper in headless rhino so i deleted all other plugins as well. Server seems to be up and running correctly.

when running examples, i am getting 2 different issues depending how i launch them:

1 - when using; python -m SimpleHTTPServer on port 8000 i get this:

i wonder if python installation is clashing with .net or something else? Before i got a popup to specifiy the server location at least.

2- (resolved)

so i tried to run example files with live server inside VS Code instead of python. I can then specify server and key. it seems i get response from rhino compute, correctly but i get following error,
“script.js:65 Uncaught (in promise) TypeError: Cannot read property ‘0’ of undefined
at compute (script.js:65)”
it seems data is there. I have not changed anything inside example files

(solution)

RhinoCompute.url = getAuth( 'RHINO_COMPUTE_URL' ) // RhinoCompute server url. Use http://localhost:8081 if debugging locally.
change to “http://localhost:8081/” (slash at the end)

and
const data = JSON.parse(res.values[0].InnerTree['{ 0; } '][0].data)

to
const data = JSON.parse(res.values[0].InnerTree['{0}'][0].data)
(tree branch description)

It sounds like this issue: Problems with some examples for Rhino.Compute/appserver - #9 by aitorleceta