Error: write EPIPE

Hello everyone,

I installed Visual Studio after discovering PyCharm. A much more comfortable way to code. I followed all of the instructions here.

The problem is that when I run a python file from within VS, I get the “Error: write EPIPE”. Here is what happens in Rhino when I run the file.

Loading Rhino Render, version 1.50, Jan 28 2020, 13:51:45
Command: _CodeListener
VS Code Listener Started…
Command: -_EditPythonScript
">>> ( Debugging=On ): Debugging=Off
">>> ( Debugging=Off ): (
C:\Users\Erdem\AppData\Local\Temp\resetscriptengine.py
)
Python script engine has been reset.

What do you think is wrong?

Hello again,

Does anybody else see this?

Received invalid data, please try again.
VS Code Listener stopped. Please run CodeListener again.

I am having the same issue and don’t know what to do, have you figured out what the problem is yet?

Hello,

Thanks for writing… :slight_smile: At least I now know I’m not alone.

The funny thing is that when I first set it up it worked. But after some time I started to get this error. Maybe after a R6 update, I’m not sure.

Did it work in the beginning for you or it simply never worked?

Hey! I actually just found a solution, go to this site https://github.com/ccc159/RhinoPythonForVscode and download the 3rd folder option, “src” and put in the same folder you have the RhinoPythonForVscode-master.

Hey, thank you for the answer. I need to ask something however. same folder you have the RhinoPythonForVscode-master file that you described is on desktop. I guess that’s not the corrext directory. Can you describe which folder I should put the src folder in?

Hi,

Please try update the RhinoPython plugin in your vs code to version 0.1.11.This bug is fixed in that version.

Thank you for your reply. I did that and now there is no error. However, no code is being executed either. I get a
“Python script engine has been reset.”
message in the rhino prompt and that’s all.

I don’t know what went wrong. I just installed updated for rhino and that’s it. It was working when I first installed it.

It’s difficult to help from what you described. Could you make screenshots or videos to show what went wrong? Did you try to print anything so that you know it works or not?

That’s right. It is hard. There are no errors. Here is what it reads in the rhino prompt.

At rhino start:

Loading Rhino Render, version 1.50, Apr 23 2020, 05:51:39
Command: _CodeListener
VS Code Listener Started…

and when I execute a simple print something code from within the VSCode, this happens in the rhinoprompt:

Command: -_EditPythonScript
( Debugging=On ): Debugging=Off
( Debugging=Off ): (
C:\Users\Erdem\AppData\Local\Temp\resetscriptengine.py
)
Python script engine has been reset.

And no errors on both sides…

Sorry @Erdem for the late reply. Did you actually try to print anything in your code or add anything in rhino? Looks like your code should have been executed already.

Hello, no problem about the late reply! We all have things to do. :wink:

Well, after I read your message I run Rhino and created a new .py file in VSCode and tried to print “Hello” and it worked. I even made a circle with rs.AddCircle(). But after a couple of tries it stopped working again. What do you think is wrong? I have CodeListener v0.1.7.0 installed…

Tried with Rhino 5, 6 and 7 with no success. Also tried Visual Studio 2015 instead of VSCode, again the same outcome (No errors but nothing prints).

By the way I have Windows 8.1.

Unfortunately we have never tested CodeListener on other platforms except windows 10. I am not sure it is caused by the system version. But from what you described it is more likely the communication between the editor and rhino has broken after some time. As it is rather an unique issue here which only happens on your machine, we’d suggest you to run it somewhere else…

Yes, that’s what I was thinking too. Maybe it is time for a format.

Thank you for the reply.