Rhino 6 WIP, Grasshopper, Python does not load os module

python

#1

i just dowloaded rhino 6 wip, grasshopper pyhton componen will not load “os” module. i cant figure out why. it is in located here C:\Program Files\Rhino WIP\Plug-ins\IronPython\Lib as os.py.

error:
MissingMethod Exception, Void Microsoft.Scripting.Utils.ExceptionUtils.RemoveData(System.exception, System.Object)

As a sugestion i would appreciate is it is possible to copy errors from python copmonens as a text (directly in editor)

thanks!


Compliling Components using GHPython and PyDev
Cannot load "os" module in python in Rhino WIP
(Willem Derks) #2

Hi Vladimir,

This looks related, @piac might have some insights …

-Willem


#3

For what it’s worth, I just checked on my system and had no issue importing os (Work In Progress (6.0.16292.17231, 10/18/2016)). Could be a .NET framwork thing maybe?

Ditto, in fact I must say I’m not really a fan of the new console Output window in general. I’m sure there are good reasons for changing it (haven’t quite figured out what the “P” icon is or the purpose of the cycle/element stuff yet), but I’m finding that it works counter to the workflow I’ve built up over the past few years of using GHPython. I use the console output EXTENSIVELY for introspection, profiling, debugging etc. And this new one just feels rather sluggish and bloated honestly. Maybe I’m just stuck in my ways!

/A


#4

Hi Anders,

thanks for reply

I have the same build (6.0.16292.17231, 10/18/2016), grasshopper is 1.0.0004.

import os works at the same time in rhino 5 and grashopper 0.76

i tried to relink to manual path, this is more dtailed error: (updated to standard set up)

in os.py line 63


(Giulio Piacentino) #5

Why is your os is C:\TempUser\ ?
It seems that is different than what you just said in the premises, no?


(Giulio Piacentino) #6

It might be that you, as a “pro” user, do not need this information. In which parts would you need changes?


#7

I think it’s a couple of things:

  1. I don’t quite understand what the new features do (i.e. why are they there)? So I need enlightenment :slight_smile:

  2. The new GHPython component appears to be slightly slower at outputting stuff to the console (just by a little, but it’s enough that I notice and that it bothers me). Might be wrong though, haven’t used it enough yet. Will definitely get back to you on this.

  3. The ability to copy text from the output window (see above).

  4. I just find it all a bit clunky and too big. As in, it’s simply not as sleek and minimal as the old version. It takes up quite a bit more screen real estate (i.e. I literally have to make the new GHPython window bigger than I’d like to, to view the same amount of information as with the old one.).

Those are my immediate gripes, but also remember that I’m an old conservative fart that likes totally minimal IDE’s and generally find GUI chrome and bloat totally annoying :wink:

/A


Changes to GhPython UI
#8

Right there i tried to link to os.py through adding custom sys.path, but it did not help

here is same error in standard setup


(Giulio Piacentino) #9

Would you please take a screenshot of the GhPython version that is running? So I can try to reproduce better. I am unable to reproduce this right now.

Also, could you please run _EditPythonScript, and see if the same error appears there, too, when importing os? Thanks!


#10

Where does ghpython version show?

in rhino same error:


(Giulio Piacentino) #11

lower right [quote=“Vladimir_Ondejcik, post:10, topic:37877”]
Where does ghpython version show?
[/quote]

In the lower right corner of the GhPython window.


#12


Compliling Components using GHPython and PyDev
(Steve Baer) #13

Did you install IronPython on your computer? If you did, try uninstalling Ironpython to see if that fixes the error. There are known conflicts for having both installed on some people’s computers.


Rhino WIP-Grasshopper plug-in: Ladybug/Honeybee Error on opening .gh file
#14

Hi,

i can confirm that uninstalling ironpython helped, here is version i found installed:

thanks a lot for help


#15

hi again.
i was checking where was my sencond version of python comming from. and it is installed by DynamoBIM for Revit. I It stopped working when i uninstalled other python module, It would be nice to be able to install them next to each other.
/Vladimir


(Giulio Piacentino) #16

@Vladimir_Ondejcik; I hear that the very latest versions of IronPython are OK with Rhino (at least Rhino WIP). Could you try IronPython 2.7.7?
Thanks,

Giulio

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


(Giulio Piacentino) #17

See IronPython installation + Rhino 5 / Rhino WIP


#18

I had the same problem in windows WIP, my IronPython was the latest - 2.7.7, which didn’t work. I had to downgrade it to 2.7.5. Hope this helps!


#19

For what it’s worth, I’ve tried to raise these concerns with the Dynamo developers. Hopefully they’ll change their IronPython distribution model to prevent these issues from occurring in the future.