Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPython_to_GH.py invoke Rhino 5.0 in a RH6 context #29

Closed
yijiangh opened this issue Aug 1, 2019 · 1 comment
Closed

CPython_to_GH.py invoke Rhino 5.0 in a RH6 context #29

yijiangh opened this issue Aug 1, 2019 · 1 comment

Comments

@yijiangh
Copy link

yijiangh commented Aug 1, 2019

Problem

I'm trying to test the CPython_to_GH.py example with Rhino 6.0.

What happened

I installed ghpythonremote in my conda env (python2.7, activated), and the ironpython configuration seems to be set up properly, with the console telling me the following:

> python -m ghpythonremote._configure_ironpython_installation
The gh-python-remote package will be installed in Rhino IronPython with the command:
C:\Users\harry\.conda\envs\py27\python.exe -m pip install --upgrade --target=C:\Users\harry\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib --no-binary=:all: --no-compile --ignore-requires-python gh-python-remote
...
Successfully installed gh-python-remote-1.2.1 plumbum-1.6.7 rpyc-4.1.1
INFO:Copied example files to C:\Users\harry\AppData\Roaming\Grasshopper\UserObjects\gh-python-remote

Notice that the IronPython of Rhino 6 is correctly identified above.

But if I run python CPython_to_GH.py in the path examples, Rhino 5 will be invoked and the following error shows up:

image

Well, I did python -m ghpythonremote._configure_ironpython_installation 5 as well. Before I did that, the error was simply "cannot locate module ghpythonremote".

Am I doing anything wrong here? I feel like there should be a parameter in the PythonToGrasshopperRemote class to let it know that we are dealing with RH5 or RH6, if both are installed in the system.

@yijiangh yijiangh changed the title CPython_to_GH.py invoke Rhino 5.0 CPython_to_GH.py invoke Rhino 5.0 in a RH6 context Aug 1, 2019
@pilcru
Copy link
Owner

pilcru commented Aug 5, 2019

This is some seriously old and dusty code you are looking at here Yijiang :-) I don't think anyone's really used it in the past 2 years. Thanks for trying it!

It looks like there are two things to fix here:

  • there needs to be a way to select which version of Rhino to run
  • there is a bug in the example you show, I'm guessing a mismatch in exception handling settings in rpyc between the two interpreters.

I'll try to have a look at it this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants