Grasshopper

algorithmic modeling for Rhino

Hi all, 

recently rhinoscriptsyntax stopped working (both in the PythonScript Editor as well as ghpython) on my computer. While this has the benefit of forcing me to dive into rhinocommon i still miss my rs... and all scripts that are using it. 

When importing rs, the error message (attached to this post) seems to suggest a syntax error in the __init__.py file. 

Here the content of this file, which seems to be exactly the same as on github: 

# A collection of RhinoScript-like functions that can be called from Python

__all__ = ["application", "block", "curve", "dimension", "document", "geometry",
"grips", "group", "hatch", "layer", "line", "linetype", "light",
"mesh", "object", "plane", "pointvector", "selection", "surface",
"toolbar", "transformation", "userdata", "userinterface", "utility", "view"]


import application, block, curve, dimension, document, geometry, grips, group
import hatch, layer, line, linetype, light, mesh, object, plane, pointvector
import selection, surface, toolbar, transformation, userdata, userinterface, utility, view

Did anyone else encounter similar problems or has an idea how to fix this?

I am grateful for any help, since i have no idea how to approach the problem!

Best, 
Leo

Views: 1312

Attachments:

Replies to This Discussion

Hi Leo,

reinstalling Rhino will fix this in Rhinoceros 5.

In Rhino WIP, you can also run the _EditPythonScript command, go to Tools -> Options -> (you are in the File tab) -> Reset rhinoscriptsyntax files.

Thanks,

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

hi Tom and Giulio, 

thanks for your replies.

Since i am having this problem with a machine at work i will have to wait until monday for the IT guys to re-install rhino then. I think we are running Rhino5 SR10 (i'll ask them to update). I am using the latest version of ghpython. 

Strangely i am having the same problem on all computers in the office when i log in with my account. It works fine when logged in with a different account, though.

I'll try the re-install next week and report back. 

Thanks!

Leo

I just remembered an additional method for Rhino 5 that does not require reinstall.

  • close Rhino
  • go to: %appdata%\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings
  • there should be a version.txt file: delete it
  • restart Rhino and run the _EditPythonScript file

Thanks

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

hi Giulio, 

deleting the version.txt file worked!

Thanks a lot!

Leo

Good! That deletion also causes the library to be reset.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service