rs.Distance error - Grasshopper2024-03-28T15:50:20Zhttps://www.grasshopper3d.com/forum/topics/rs-distance-error?commentId=2985220%3AComment%3A446473&feed=yes&xn_auth=noYeah, I have that trick for t…tag:www.grasshopper3d.com,2011-10-07:2985220:Comment:4466432011-10-07T19:26:00.577ZDavid Andreshttps://www.grasshopper3d.com/profile/DavidAndres
<p>Yeah, I have that trick for the time being haha.</p>
<p> </p>
<p>Thank you guys.</p>
<p>Yeah, I have that trick for the time being haha.</p>
<p> </p>
<p>Thank you guys.</p> I think I see what is going o…tag:www.grasshopper3d.com,2011-10-07:2985220:Comment:4464932011-10-07T18:00:04.775ZSteve Baerhttps://www.grasshopper3d.com/profile/SteveBaer
<p>I think I see what is going on. There is a lot of work that is performed when the python engine is first started and this work is being done in a separate thread. I missed a spot where the grasshopper python component thread should wait until the "warmup" thread is done.</p>
<p> </p>
<p>This should be fixed in next week's V5 beta. Sounds like you know a workaround for the time being.</p>
<p>Thanks,</p>
<p>-Steve</p>
<p>I think I see what is going on. There is a lot of work that is performed when the python engine is first started and this work is being done in a separate thread. I missed a spot where the grasshopper python component thread should wait until the "warmup" thread is done.</p>
<p> </p>
<p>This should be fixed in next week's V5 beta. Sounds like you know a workaround for the time being.</p>
<p>Thanks,</p>
<p>-Steve</p> Well, I know it's weird, but…tag:www.grasshopper3d.com,2011-10-07:2985220:Comment:4465532011-10-07T16:07:27.648ZDavid Andreshttps://www.grasshopper3d.com/profile/DavidAndres
<p>Well, I know it's weird, but I've checked it several times:</p>
<p>- If after opening Rhino, I open first the Python editor, it works in the editor and later in GH too.</p>
<p>- If after opening Rhino, I open first GH, it fails here and in the editor later too, with this error:</p>
<p><em>Message: 'module' object has no attribute 'Distance'</em><br/> <em>Traceback: line 8, in <module>, line 5, in <module>, "C:\Users\David\Desktop\dd_cmd.py"</em></p>
<p> </p>
<p>Well, I know it's weird, but I've checked it several times:</p>
<p>- If after opening Rhino, I open first the Python editor, it works in the editor and later in GH too.</p>
<p>- If after opening Rhino, I open first GH, it fails here and in the editor later too, with this error:</p>
<p><em>Message: 'module' object has no attribute 'Distance'</em><br/> <em>Traceback: line 8, in <module>, line 5, in <module>, "C:\Users\David\Desktop\dd_cmd.py"</em></p>
<p> </p> If you haven't done so alread…tag:www.grasshopper3d.com,2011-10-07:2985220:Comment:4464732011-10-07T15:22:02.727ZSteve Baerhttps://www.grasshopper3d.com/profile/SteveBaer
<p>If you haven't done so already, I would recommend running Giulio's script both in a grasshopper python component and in the "EditPythonScript" command. Hopefully that will shed some light on the issue.</p>
<p>Thanks,</p>
<p>-Steve</p>
<p>If you haven't done so already, I would recommend running Giulio's script both in a grasshopper python component and in the "EditPythonScript" command. Hopefully that will shed some light on the issue.</p>
<p>Thanks,</p>
<p>-Steve</p> Same error after restore. The…tag:www.grasshopper3d.com,2011-10-07:2985220:Comment:4463972011-10-07T15:11:44.337ZDavid Andreshttps://www.grasshopper3d.com/profile/DavidAndres
<div><p>Same error after restore. The <em>rs.Distance</em> doesn't work in the PythonScript editor outside GH either. Just doesn't appear in the list of orders (?).</p>
<p>I'm going to reinstall everything and try again.</p>
<p> </p>
<p>Fotgot to mention its 64 bits version.</p>
<p> </p>
<p>Thanks for the quick answer!</p>
</div>
<p> </p>
<div><p>Same error after restore. The <em>rs.Distance</em> doesn't work in the PythonScript editor outside GH either. Just doesn't appear in the list of orders (?).</p>
<p>I'm going to reinstall everything and try again.</p>
<p> </p>
<p>Fotgot to mention its 64 bits version.</p>
<p> </p>
<p>Thanks for the quick answer!</p>
</div>
<p> </p> I also installed the update o…tag:www.grasshopper3d.com,2011-10-07:2985220:Comment:4463762011-10-07T13:11:27.899ZGiulio Piacentinohttps://www.grasshopper3d.com/profile/GiulioPiacentino
<p>I also installed the update on 32-bit and this error did not show up.</p>
<p>Also, writing:<br></br><code><br></br>import rhinoscriptsyntax as rs<br></br>import math<br></br><br></br>a = []<br></br>a.append(rs.Distance([0,0,0], [1,1,0]))<br></br>a.append(abs(result[0] - math.sqrt(2)) < 0.01)<br></br></code></p>
<p>a is returned as a list with 1.41..., True.<br></br>Can you try the file?</p>
<p>---</p>
<p>If this does not work, could you do the following:</p>
<ul>
<li>go to the Windows <em>Control Panel</em></li>
<li>choose…</li>
</ul>
<p>I also installed the update on 32-bit and this error did not show up.</p>
<p>Also, writing:<br/><code><br/>import rhinoscriptsyntax as rs<br/>import math<br/><br/>a = []<br/>a.append(rs.Distance([0,0,0], [1,1,0]))<br/>a.append(abs(result[0] - math.sqrt(2)) < 0.01)<br/></code></p>
<p>a is returned as a list with 1.41..., True.<br/>Can you try the file?</p>
<p>---</p>
<p>If this does not work, could you do the following:</p>
<ul>
<li>go to the Windows <em>Control Panel</em></li>
<li>choose <em>Uninstall a Program</em></li>
<li>find <em>Rhinoceros 5.0 WIP</em></li>
<li>choose <em>Restore</em></li>
</ul>
<p>Did this solve the problem?</p>
<p> </p>
<p>Thanks,</p>
<p>- Giulio<br/>_______________<br/>giulio@mcneel.com<br/>McNeel Europe</p>