I can`t connect Rhino and Python(Atom)....Please help!

Hello alltogehter,
I am a complete beginner in Python, but I am trying to learn the language now…
My problem is, that I can`t connect Rhino and Atom!

I have wrote the examle code in Atom like this:

  1. import rhinoscriptsyntax as rs
  2. from Rhino.Geometry import Point3d
  3. rs.AddCircle(Point3d.Origin, 5.0)

than I wanted to see, what I have done in Rhino (5.0.2., trial version) by hitting ctrl+alt+r to run the command, but nothing happens in Rhino!!! :(((

the thing is, that in Rhino is written: Listening for Atom editor requests…
And when I StartAtomEditorListener again Rhino tells me, that the programm is already listening for Atom.
… but nothing happens!!

When I save the Atom-code as a Python-File, I can open it in Rhino by RunPythonScript completely normal…
I realy don`t understand, where the problem is…!!! :frowning: :frowning:

Can somebody help me? Thank You so much!!!
Mags

I’m not sure what the problem is. A few things to check:

  • do you have only one instance of Rhino running? Did you try to restart Rhino?

  • Is your file on the local file system or on a remote share? Being on a remote server should not be a problem but if it is can you copy the file locally just to check?

  • If you type the “http://http://localhost:8080/ping” URL in a browser do you get a response?

… still not working…
I have two versions of Rhino installed on my Mac… but only the one running…the newer one.
The older Version even doesn`t recognise the command StartAtomEditorListening! :frowning:
I restarted Rhino a couple of times already…

I don`t know how to work like that, it takes tame to save the file as .py every time instead of just testing the code! :frowning:

@Magica are you keeping your python scripts in the default folder?

Here is original post about using Atom with Rhino for Mac … The rhino-python package for the Atom text editor and Rhino for Mac

@Alain shouldn’t your first post about using Atom with Rhino for Mac be pinned somewhere here on discourse? This would help link to the actual document page.

@Magica do you see something like this when in Atom, when you right-click the python file?

If you have a newer Atom, you then have to right-click in the actual text area of Atom.

Does this help?

What I am seeing is that Atom does not recognize the WIP - error message - “Rhino isn’t listening for requests…” Do I have to do something in Atom to make it work with the WIP as well as the release version?

–Mitch

Hi Mitch - At the moment you need to rename the application to Rhinoceros.app (after renaming Rhinoceros.app of course). Alain is going to make this better, I believe.

-Pascal

So I need to rename the release version to something else and the WIP to the release version? Then Atom will work with the WIP - but not the release version - is that it? Unfortunately, if that’s the case it won’t work for me, I need to test stuff against the release version.

–Mitch

Yep… A little messy right now.

-Pascal

@magica,

From your other Discourse post you are getting code completion so Rhino is listening to Atom and responding.

If you have many other packages installed in Atom one might interfere with the ctrl + alt+r key bindings. Try launching the command from the main menu:

Alain

Mitch,

I’ll update the WIP so it works with Atom.

Alain

That’s probably a good idea although that post is not the best one to pin. Let me look.
Thanks.

Hi,
I have exactly the same problem as @Magica. I installed Atom as it was in the instruction. I reinstalled Rhino, and I still get this message: Rhino isn’t listening for requests. Run the “StartAtomEditorListener” command from within Rhino.

I couldn’t find any solution.
Can you help me?
Jan

Hi,

Did you follow the instructions here?

What version of Rhino are you running?

Are you getting code completion but only getting the “Rhino isn’t listening” message when you try to run the script? Or is code completion not working as well?

Yes, several times. Than, I reinstalled both programs and tried again but without positive result.
Of course every time I was typing StartAtomEditorListener.
I’m wondering if it is something wrong with the port communication, but I don’t know how to check it.

What version of Rhino are you running?

“without positive result” Can you elaborate?
Does code completion work or is it just running the script that doesn’t work?

Rhino listens on port 8080. That is not configurable right now but will be in a later version. What do you get when you type:

sudo lsof -i TCP:8080 | grep LISTEN

in a terminal window?

The latest 5.1 (5B161), educational licence.
Code completion doesn’t work as well.
When I use RunPhytonScript the code is running.

In terminal I got this:

With Rhino listening (StartAtomEditorListener), can you try this?

In Atom from the ‘View’ menu select ‘Developer -> Toggle Developer Tools’ and then select the ‘Console’ tab.

In a new Python script (file name ends with ‘.py’) type:

import

Now when you type a space ’ ’ after import what shows up in the Atom Console window?
Thanks


I’m not having any luck duplicating your problem :frowning:
Still investigating …
Thanks