Message: 'module' object has no attribute 'LayerNames'

Hi

I’m trying to figure out what’s going on with python, all my codes suddenly stopped running yesterday. I’ve narrowed down the problem to the rhinoscriptsyntax module, the error only appears when I import it…

So if I run the code to just load the module:

import rhinoscriptsyntax as rs

The following error appears : Message: ‘module’ object has no attribute ‘LayerNames’

When I delete import rhinoscriptsyntax as rs the error goes away, but the code obviously doesn’t run.
I’ve re-installed rhino and the error persists. I’m a bit perplexed about the hole thing, has the module been corrupted? Mabey a manual reinstall will help?

Some feedback would be much appreciated.

Hi.

I “fixed” the problem, just nuked rhino of the map and did a fresh re-install:

0. Save you pre-sets and toolbars

  1. Goes without saying save all you aliases, macros, templates, toolbars, yada yada yada…

1. Run the Program Uninstall.

  1. Close the Rhino application.
  2. Go to Windows Search.
  3. Type App and Features. (or Add and Remove programs)
  4. Find the Rhinoceros x.0 program on the list, pick and select Uninstall button.

2. Delete the Rhino install folder.

  1. Browse to C:\Program Files.
  2. Delete folder Rhinoceros x or Rhinoceros x Evaluation.

3. Delete the Rhino folders.

  1. Browse to %AppData%\Roaming\McNeel\Rhinoceros.
  2. Delete folder x.0 where x is the Rhino version.
  3. Browse to %ProgramData%\McNeel\Rhinoceros
  4. Delete folder x.0 where x is the Rhino version.

4. Delete Registry Keys:

  1. Go to Windows Search and type Registry Editor.
  2. Open the Registry Editor.
  3. Browse to HKEY_LOCAL_MACHINE\Software\McNeel\Rhinoceros.
  4. Delete the x.0 Key. For example, Rhino 4.0, 5.0 or whatever version of Rhino you are removing.
  5. Browse to HKEY_CURRENT_USER\Software\McNeel\Rhinoceros.
  6. Delete the x.0 Key. For example, Rhino 4.0, 5.0 or whatever version of Rhino you are removing.

5. Reboot

  1. Apply all Windows updates.