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

Issues since rpyc update 4.1.0 #19

Closed
markhorgan opened this issue Jun 1, 2019 · 21 comments
Closed

Issues since rpyc update 4.1.0 #19

markhorgan opened this issue Jun 1, 2019 · 21 comments

Comments

@markhorgan
Copy link

This is a continuation of the comment I left on the plugin page. I created rhinoremote2 virtualenv and it installed fine. No errors apart from deprecation warnings. This is the full error message when I try and run the example file (Ì changed the location to conda://rhinoremote2)

DEBUG: ghpythonremote.connectors:
Using python executable: C:\Users\john\.conda\envs\rhinoremote2\python.exe
DEBUG: ghpythonremote.connectors:
Using rpyc_server module: C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\pythonservice.py
DEBUG: ghpythonremote.connectors:
Using port: 52348
DEBUG: ghpythonremote.connectors:
Using log_level: DEBUG
DEBUG: ghpythonremote.connectors:
Using working_dir: C:\Users\john\AppData\Roaming\Grasshopper\UserObjects\gh-python-remote\examples
INFO: ghpythonremote.connectors:
Connecting...
DEBUG: ghpythonremote.connectors:
Connecting. Timeout in 10 seconds.
Runtime error (EndOfStreamException): EOFError

Traceback:
  line 55, in recv, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\channel.py"
  line 100, in value, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 76, in syncreq, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\netref.py"
  line 161, in __getattribute__, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\netref.py"
  line 217, in _install, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 213, in on_connect, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 105, in _connect, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 44, in connect_channel, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 56, in connect_stream, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 99, in connect, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 75, in connect, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\classic.py"
  line 36, in __init__, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
  line 256, in read, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\stream.py"
  line 374, in serve, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 47, in wait, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 455, in sync_request, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 117, in _get_connection, "C:\Users\john\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
  line 49, in script
@co-ord
Copy link

co-ord commented Jun 3, 2019

Hi,
I get the same kind of error message.
Running windows 10 on a 64 bits machine with Rhino 6.
Latest version of IronPython (2.7.8)

DEBUG: ghpythonremote.connectors:
Connecting. Timeout in 10 seconds.

INFO: ghpythonremote.connectors:
Connecting...

DEBUG: ghpythonremote.connectors:
Using working_dir: C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\examples

DEBUG: ghpythonremote.connectors:
Using log_level: DEBUG

DEBUG: ghpythonremote.connectors:
Using port: 51291

DEBUG: ghpythonremote.connectors:
Using rpyc_server module: C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\pythonservice.py

DEBUG: ghpythonremote.connectors:
Using python executable: C:\Python27\python2.exe

DEBUG: ghpythonremote.helpers:
Directly trying python executable at C:\Python27\python2.exe


Runtime error (EndOfStreamException): EOFError


Traceback:
  line 76, in syncreq, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\netref.py"
  line 161, in __getattribute__, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\netref.py"
  line 217, in _install, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 213, in on_connect, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 105, in _connect, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 44, in connect_channel, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 56, in connect_stream, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 256, in read, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\stream.py"
  line 55, in recv, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\channel.py"
  line 374, in serve, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 47, in wait, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 100, in value, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 455, in sync_request, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 99, in connect, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 75, in connect, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\classic.py"
  line 117, in _get_connection, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
  line 36, in __init__, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
  line 49, in script

@co-ord
Copy link

co-ord commented Jun 3, 2019

Following my previous comment I tried with a conda environement and ended-up with the same issue.

DEBUG: ghpythonremote.helpers:
Directly trying python executable at C:\Users\solub\Anaconda2\envs\rhinoremote\python.exe

DEBUG: ghpythonremote.connectors:
Using python executable: C:\Users\solub\Anaconda2\envs\rhinoremote\python.exe

DEBUG: ghpythonremote.connectors:
Using rpyc_server module: C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\pythonservice.py

DEBUG: ghpythonremote.connectors:
Using port: 62462

DEBUG: ghpythonremote.connectors:
Using log_level: DEBUG

DEBUG: ghpythonremote.connectors:
Using working_dir: C:\Users\solub\Anaconda2\envs\rhinoremote\Lib\site-packages\ghpythonremote\examples

INFO: ghpythonremote.connectors:
Connecting...

DEBUG: ghpythonremote.connectors:
Connecting. Timeout in 10 seconds.

Runtime error (EndOfStreamException): EOFError

Traceback:
  line 76, in syncreq, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\netref.py"
  line 161, in __getattribute__, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\netref.py"
  line 217, in _install, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 213, in on_connect, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 105, in _connect, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 44, in connect_channel, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 56, in connect_stream, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 256, in read, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\stream.py"
  line 55, in recv, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\channel.py"
  line 374, in serve, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 47, in wait, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 100, in value, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 455, in sync_request, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 99, in connect, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 75, in connect, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\classic.py"
  line 117, in _get_connection, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
  line 36, in __init__, "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
  line 49, in script

I have to say that I've encountered an error during installation when pasting the following line in the Anaconda prompt:

C:\Users\solub>python -m ghpythonremote._configure_ironpython_installation

WARNING:No ghpy_version.txt file installation found in C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings.
Was ghpython installed and opened in Grasshopper at least once on this machine?
ERROR:IronPython lib directory for Rhinoceros not found in C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings.
Please provide a full path to one of the folders in your IronPython for Rhinoceros path.
These folders are listed in the settings of the window opened with the command `_EditPythonScript` in Rhinoceros
Traceback (most recent call last):
  File "C:\Users\solub\Anaconda2\envs\rhinoremote\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Users\solub\Anaconda2\envs\rhinoremote\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Users\solub\Anaconda2\envs\rhinoremote\lib\site-packages\ghpythonremote\_configure_ironpython_installation.py", line 15, in <module>
    rhino_ironpython_path = get_rhino_ironpython_path(location=location)
  File "C:\Users\solub\Anaconda2\envs\rhinoremote\lib\site-packages\ghpythonremote\helpers.py", line 78, in get_rhino_ironpython_path
    return get_ironpython_from_appdata()
  File "C:\Users\solub\Anaconda2\envs\rhinoremote\lib\site-packages\ghpythonremote\helpers.py", line 121, in get_ironpython_from_appdata
    raise RuntimeError('No IronPython lib folder found in %APPDATA%')
RuntimeError: No IronPython lib folder found in %APPDATA%

So my reaction to try again and specifying a correct location:

C:\Users\solub>python -m ghpythonremote._configure_ironpython_installation "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings"

The installation was then successful but I'm still facing the errors mentionned above.

Really hope someone can help.

@co-ord
Copy link

co-ord commented Jun 4, 2019

Just to be clear, what Rhinoceros' IronPython's folder are we supposed to install ghPythonRemote in ?

This one:
C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib

or this one:

C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\site-packages

Tried both but still getting the rpyc related errors.

@loudonicus
Copy link

Hi all, I'm having the same problem. It is odd as I was sure I had ghpython remote working on this laptop previously. I have it running on my desktop PC fine. Both Rhino6 . I can't think what I have done that is different between these two installs.

@co-ord
Copy link

co-ord commented Jun 11, 2019

Let's hope @pilcru will find some time to investigate the issue. Have spent a whole week on this, to no avail.

@pilcru
Copy link
Owner

pilcru commented Jun 11, 2019

Sorry for the delayed response, I've got very little time to work on the plugin these days. I haven't been able to reproduce that issue on my end, and I don't really know what could be causing it. So I'm gonna have to have you do some of the debugging, if that's okay.

Do you see any sign of the CPython side running? On most setups, a terminal will open, running the Python process and with this output (don't confuse it with the one that opens up to run conda to find the path to the python executable):
image

On some machines, this does not open (but ghpyr still works). If you don't see it, is there a new Python process that shows up in the task manager? Considering the connection gets dropped almost immediately, any of these might be difficult to spot, so not a definite way to check if it's working.

Another way to test the CPython end of this would be to try running it independently. Open a cmd.exe and run:

cd "C:\Users\solub\Anaconda2\envs\rhinoremote\Lib\site-packages\ghpythonremote\examples"
"C:\Users\solub\Anaconda2\envs\rhinoremote\python.exe" "C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\pythonservice.py" 62462 DEBUG

(using @solub's log file here, adapt to your own username and settings)

Another thing that could be an issue are firewalls and execute permissions in general. In a stock Windows install, the port that's opened is not blocked by the windows firewall, and normal user permissions are enough to launch a python process.

Are you running corporate machines, with especially restrictive firewalls and antivirus? If you can disable these, and/or run Rhino as an admin, and try again, that might provide additional info.

@pilcru
Copy link
Owner

pilcru commented Jun 11, 2019

Just to be clear, what Rhinoceros' IronPython's folder are we supposed to install ghPythonRemote in ?

This one:
C:\Users\solub\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib

or this one:

C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\site-packages

Tried both but still getting the rpyc related errors.

I don't think that would make a difference, since they are both in Rhino's IronPython path. I normally recommend the first one because it's in the user files and so has fewer permission issues.

That's the command I use to install on Rhino 6:

python -m ghpythonremote._configure_ironpython_installation "%APPDATA%\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib"

@farzanehFathi
Copy link

Hi there,

Do you see any sign of the CPython side running? On most setups, a terminal will open, running the Python process and with this output (don't confuse it with the one that opens up to run conda to find the path to the python executable):

@pilcru, Thank you for your help, I have the same problem and tried all of the solutions you suggested, but I can't fix it. When I try to run the component, I see the terminal you mentioned in this way:

1
2
3
4
5

@pilcru
Copy link
Owner

pilcru commented Jun 18, 2019

That's interesting, I thought I had fixed those string vs unicode type errors before... Can you tell me what versions you have installed, by running the following commands?

In the Windows cmd:

conda activate rhinoremote
conda -V
python -V
pip show rpyc
pip show gh-python-remote

In a Rhino Python script:

import rpyc, ghpythonremote, sys, os
from ghpythonremote import version as ghpyrv

print(sys.version)
print(sys.path)
print(rpyc.__version__)
print(rpyc.__path__)
print(ghpyrv.__version__)
print(ghpythonremote.__path__)

For reference, this is what I get:

conda 4.6.14

Python 2.7.16 :: Anaconda, Inc.

Name: rpyc 
Version: 4.0.2
Summary: Remote Python Call (RPyC), a transparent and symmetric RPC library
Home-page: http://rpyc.readthedocs.org
Author: Tomer Filiba
Author-email: [email protected]
License: MIT
Location: c:\users\pierre\appdata\local\continuum\anaconda3\envs\rhinoremote\lib\site-packages
Requires: plumbum
You are using pip version 9.0.3, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Name: gh-python-remote
Version: 1.1.4
Summary: GH Python Remote is a package to get Rhinoceros3D/Grasshopper and Python to collaborate better: connect an external python instance to Grasshopper, and vice-versa.
Home-page: https://github.com/Digital-Structures/ghpythonremote
Author: Pierre Cuvilliers
Author-email: [email protected]
License: MIT
Location: c:\users\pierre\appdata\local\continuum\anaconda3\envs\rhinoremote\lib\site-packages
Requires: rpyc
You are using pip version 9.0.3, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

2.7.8 (IronPython 2.7.8 (2.7.8.0) on .NET 4.0.30319.42000 (64-bit))
['C:\\Users\\pierre\\AppData\\Local\\Temp', 'C:\\Program Files\\Rhino 6\\Plug-ins\\IronPython\\Lib', 'C:\\Users\\pierre\\AppData\\Roaming\\McNeel\\Rhinoceros\\6.0\\Plug-ins\\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\settings\\lib', 'C:\\Users\\pierre\\AppData\\Roaming\\McNeel\\Rhinoceros\\6.0\\scripts', 'C:\\Program Files\\IronPython 2.7', 'C:\\Program Files\\IronPython 2.7\\DLLs', 'C:\\Program Files\\IronPython 2.7\\Lib']
(4, 0, 2)
['C:\\Users\\pierre\\AppData\\Roaming\\McNeel\\Rhinoceros\\6.0\\Plug-ins\\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\settings\\lib\\rpyc']
1.1.4
['C:\\Users\\pierre\\AppData\\Roaming\\McNeel\\Rhinoceros\\6.0\\Plug-ins\\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\settings\\lib\\ghpythonremote']

@farzanehFathi
Copy link

farzanehFathi commented Jun 19, 2019

Thank you @pilcru, I tried to run the commands in the windows cmd and I got this error:
cmd-err

I retried using activate <\env> command without conda prefex:
cmd2

Rhino Python script Results:
2.7.8 (IronPython 2.7.8 (2.7.8.0) on .NET 4.0.30319.42000 (64-bit))
['C:\Users\farzanehhh\AppData\Local\Temp', 'C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib', 'C:\Users\farzanehhh\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib', 'C:\Users\farzanehhh\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts']
(4, 1, 0)
['C:\Users\farzanehhh\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc']
1.1.4
['C:\Users\farzanehhh\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote']

@pilcru
Copy link
Owner

pilcru commented Jun 19, 2019

So the rpyc version that is installed is newer than the one I have, and I also run into issues when upgrading to 4.1.0. Can you try this, in the windows cmd:

activate rhinoremote
pip uninstall -y rpyc
pip install rpyc==4.0.2
pip install --upgrade --target="C:\Users\farzanehhh\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib" --no-binary=:all: --no-compile --ignore-requires-python rpyc==4.0.2

and try again? It gets me back to a working installation here, but if I missed something and it's not working for you, please also report the result of runming the commands from my previous comment again.

Apparently the "fresh" install I was using when investigating was just a few hours older than the RPyC update from May 25th, so that's why I did not see the issue at first. Sorry to those whom I didn't know how to help.

@farzanehFathi
Copy link

farzanehFathi commented Jun 19, 2019

So the rpyc version that is installed is newer than the one I have, and I also run into issues when upgrading to 4.1.0. Can you try this, in the windows cmd:

It worked fine.
Thank you for your great efforts in developing and supporting this fantastic component.

@pilcru pilcru closed this as completed in 8e02d86 Jul 1, 2019
@pilcru pilcru reopened this Jul 1, 2019
@pilcru
Copy link
Owner

pilcru commented Jul 1, 2019

Closed wrong issue.

@k-mam
Copy link

k-mam commented Jul 5, 2019

Hi,

I am trying to get GH python remote work with rhino 5, and it seems i get the same kind of error message.

Versions installed:

  • rhino: 5.0
  • conda : 4.7.5
  • pyhton: 2.7.16
  • rpyc: 4.1.0
  • gh-pyhton-remote: 1.1.4

This is the error message I get when I try to run the example file:

   DEBUG: ghpythonremote.helpers: 
   Directly trying python executable at D:\DATA\k.mam\AppData\Local\Continuum\anaconda3\envs\rhinoremote
   DEBUG: ghpythonremote.connectors:
   Using python executable: D:\DATA\k.mam\AppData\Local\Continuum\anaconda3\envs\rhinoremote\python.exe
   DEBUG: ghpythonremote.connectors:
   Using rpyc_server module: D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\pythonservice.py
   DEBUG: ghpythonremote.connectors:
   Using port: 65493
   DEBUG: ghpythonremote.connectors:
   Using log_level: DEBUG
   DEBUG: ghpythonremote.connectors:
   Using working_dir: D:\DATA\k.mam\AppData\Roaming\Grasshopper\UserObjects\gh-python-remote\examples
   INFO: ghpythonremote.connectors:
   Connecting...
   DEBUG: ghpythonremote.connectors:
   Connecting. Timeout in 10 seconds.
   Runtime error (EndOfStreamException): EOFError

   Traceback:
   line 55, in recv, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\channel.py"
   line 100, in value, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
   line 161, in __getattribute__, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\netref.py"
   line 217, in _install, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
   line 213, in on_connect, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
   line 105, in _connect, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
   line 44, in connect_channel, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
   line 56, in connect_stream, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
   line 99, in connect, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
   line 75, in connect, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\classic.py"
   line 36, in __init__, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
   line 256, in read, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\stream.py"
   line 374, in serve, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
   line 47, in wait, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
   line 455, in sync_request, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
   line 76, in syncreq, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\netref.py"
   line 117, in _get_connection, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
   line 49, in script

@pilcru
Copy link
Owner

pilcru commented Jul 6, 2019

Can you try installing rpyc v4.0.2 while I fix this?

conda activate rhinoremote
pip install --force-reinstall rpyc==4.0.2
pip install --force-reinstall --target="D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib" --no-binary=:all: --no-compile --ignore-requires-python rpyc==4.0.2

@k-mam
Copy link

k-mam commented Jul 8, 2019

Can you try installing rpyc v4.0.2 while I fix this?

conda activate rhinoremote
pip install --force-reinstall rpyc==4.0.2
pip install --force-reinstall --target="D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib" --no-binary=:all: --no-compile --ignore-requires-python rpyc==4.0.2

Just tried this. But it doesn't seem to work either (see below). Please note that I am using a corporate machine (maybe my problem comes from network security restrictions).

  DEBUG: ghpythonremote.helpers:
  Directly trying python executable at D:\DATA\k.mam\AppData\Local\Continuum\anaconda3\envs\rhinoremote
  DEBUG: ghpythonremote.connectors:
  Using python executable: D:\DATA\k.mam\AppData\Local\Continuum\anaconda3\envs\rhinoremote\python.exe
  DEBUG: ghpythonremote.connectors:
  Using rpyc_server module: D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\pythonservice.py
  DEBUG: ghpythonremote.connectors:
  Using port: 56151
  DEBUG: ghpythonremote.connectors:
  Using log_level: DEBUG
  DEBUG: ghpythonremote.connectors:
  Using working_dir: D:\DATA\k.mam\AppData\Roaming\Grasshopper\UserObjects\gh-python-remote\examples
  INFO: ghpythonremote.connectors:
  Connecting...
  DEBUG: ghpythonremote.connectors:
  Connecting. Timeout in 10 seconds.
  Runtime error (Exception): KeyError

  Traceback:
  line 352, in _dispatch, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 47, in wait, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 100, in value, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 455, in sync_request, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 485, in root, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 44, in connect_channel, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 56, in connect_stream, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 99, in connect, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\factory.py"
  line 75, in connect, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\utils\classic.py"
  line 36, in __init__, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
  line 102, in value, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\async_.py"
  line 455, in sync_request, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 313, in _netref_factory, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 300, in _unbox, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 384, in serve, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\protocol.py"
  line 213, in on_connect, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 105, in _connect, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc\core\service.py"
  line 117, in _get_connection, "D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonremote\connectors.py"
  line 49, in script

@pilcru
Copy link
Owner

pilcru commented Jul 8, 2019

I think one of the two downgrades did not work as planned. Did you see any errors? Can you run the same commands as in this message above and report what you get?

@k-mam
Copy link

k-mam commented Jul 8, 2019

I think one of the two downgrades did not work as planned. Did you see any errors? Can you run the same commands as in this message above and report what you get?

 (rhinoremote) D:\DATA\k.mam\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit)>pip install --force-reinstall rpyc==4.0.2
 Requirement already satisfied: rpyc==4.0.2 in d:\data\k.mam\appdata\local\continuum\anaconda3\envs\rhinoremote\lib\site-packages
 Requirement already satisfied: plumbum in d:\data\k.mam\appdata\local\continuum\anaconda3\envs\rhinoremote\lib\site-packages\plumbum-1.6.7-py2.7.egg (from rpyc==4.0.2)
 You are using pip version 9.0.3, however version 19.1.1 is available.
 You should consider upgrading via the 'python -m pip install --upgrade pip' command.

 (rhinoremote) D:\DATA\k.mam\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit)>pip install --force-reinstall --target="D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib" --no-binary=:all: --no-compile --ignore-requires-python rpyc==4.0.2
 Collecting rpyc==4.0.2
 Using cached https://files.pythonhosted.org/packages/ba/88/1cea477a4ad7c0f546a4c82aa367185be7b8fce512db8283e82de8454772/rpyc-4.0.2.tar.gz
 Collecting plumbum (from rpyc==4.0.2)
 Using cached https://files.pythonhosted.org/packages/78/4c/1fb849111fda37d65358be1859e062278b2f94b5269f19838115966e4493/plumbum-1.6.7.tar.gz
 Skipping bdist_wheel for rpyc, due to binaries being disabled for it.
 Skipping bdist_wheel for plumbum, due to binaries being disabled for it.
 Installing collected packages: plumbum, rpyc
 Running setup.py install for plumbum ... done
 Running setup.py install for rpyc ... done
 Successfully installed plumbum-1.6.7 rpyc-4.0.2
 Target directory D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\plumbum already exists. Specify --upgrade to force replacement.
 Target directory D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\plumbum-1.6.7-py2.7.egg-info already exists. Specify --upgrade to force replacement.
 Target directory D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc already exists. Specify --upgrade to force replacement.
 Target directory D:\DATA\k.mam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rpyc-4.0.2-py2.7.egg-info already exists. Specify --upgrade to force replacement.
 You are using pip version 9.0.3, however version 19.1.1 is available.
 You should consider upgrading via the 'python -m pip install --upgrade pip' command.

@pilcru
Copy link
Owner

pilcru commented Jul 8, 2019

Can you run the same commands as in this message above and report what you get? So that we know what versions we are really working with.

You can also throw in an --upgrade argument to the second pip command to see if it complains a bit less, but really, the interesting thing here is going to be the versions of everything you are using.

@pilcru pilcru changed the title Problem getting it to work with Rhino 6 Issues since rpyc update 4.1.0 Jul 8, 2019
@k-mam
Copy link

k-mam commented Jul 8, 2019

Can you run the same commands as in this message above and report what you get? So that we know what versions we are really working with.

You can also throw in an --upgrade argument to the second pip command to see if it complains a bit less, but really, the interesting thing here is going to be the versions of everything you are using.

My bad, I reinstalled rpyc v4.0.2 and It works fine now. Thanks for your help !!

@pilcru
Copy link
Owner

pilcru commented Jul 9, 2019

All these issues should be fixed in the new version 1.2.0. If you run into similar issues (same error messages), under v1.2.0, and you find that downgrading RPyC to v4.0.2 solves your issues, feel free to reopen. Instructions to downgrade RPyC.

Otherwise, please open a new issue.

@pilcru pilcru closed this as completed Jul 9, 2019
@pilcru pilcru pinned this issue Feb 1, 2021
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

6 participants