Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
3

Can you run Ladybug/Honeybee on RhinoWIP for Mac?

asked 2016-11-09 02:38:50 -0600

updated 2016-11-09 02:39:24 -0600

It's pretty much all in the question, but here are some specifics.

I'm running macOS Sierra.

I've downloaded the latest versions:

  • RhinoWIP: 5.3 WIP (5D129w)
  • GHPython 0.6.0.3 (worked until there),
  • Ladybug 0.0.63 and Honeybee 0.0.60.

I've copied ItemSelector.gha into ~Library/Application Support/McNeel/Rhinoceros/MacPlugIns/Grasshopper/Libraries, and all of the *.ghuserfiles into ~/Library/Application\ Support/McNeel/Rhinoceros/MacPlugIns/Grasshopper/UserObjects

Now when I try to launch Grasshopper (via the ExplicitHistory command), Rhino becomes unresponsive.

Has anyone successfully used Ladybug/Honeybee on mac?

2 Answers

Sort by » oldest newest most voted
2

answered 2016-11-09 10:39:31 -0600

updated 2016-11-09 16:42:45 -0600

Hi @Julien Marrec, As I commented on GitHub the current version hasn't been tested on Mac. We already made a couple of changes to make it potentially work on Mac but I don't have access to mac to test it. The new Ladybug, Honeybee and Butterfly plugins will address this issue.

link
2

answered 2016-11-09 03:06:27 -0600

updated 2016-11-09 06:35:48 -0600

Ladybug

After finding this thread, I've now tried to only copy the ladybug *.ghuser files. RhinoWIP loads, but Ladybug doesn't fly. Based on the traceback error, I can understand why

Runtime error (TypeErrorException): argument of type 'NoneType' is not iterable

Traceback:
  line 123, in __init__, "<string>"
  line 239, in script

Circa line 123:

    #set up default pass
    if not self.folderIsSetByUser:
        if os.path.exists("c:\\ladybug\\") and os.access(os.path.dirname("c:\\ladybug\\"), os.F_OK):
            # folder already exists so it is all fine
            sc.sticky["Ladybug_DefaultFolder"] = "c:\\ladybug\\"
        elif os.access(os.path.dirname("c:\\"), os.F_OK):
            #the folder does not exists but write privileges are given so it is fine
            sc.sticky["Ladybug_DefaultFolder"] = "c:\\ladybug\\"
        else:
            # let's use the user folder
            appdata = os.getenv("APPDATA")
            # make sure appdata doesn't have space
            if (" " in appdata):
                msg = "User name on this system: " + appdata + " has white space." + \
                      " Default fodelr cannot be set.\nUse defaultFolder_ to set the path to another folder and try again!" + \
                      "\nLadybug failed to fly! :("
                print msg
                ghenv.Component.AddRuntimeMessage(gh.GH_RuntimeMessageLevel.Warning, msg)
                sc.sticky["Ladybug_DefaultFolder"] = ""
                self.letItFly = False
                return

            sc.sticky["Ladybug_DefaultFolder"] = os.path.join(appdata, "Ladybug\\")

So, if I supplied a path (eg: /Users/julien/Documents/ladybug/) it skips that section. Moving on, it crashes on line 6452

if sc.sticky.has_key("ladybug_release") and sc.sticky["ladybug_release"]:
    print "Hi " + os.getenv("USERNAME")+ "!\n" + \
          "Ladybug is Flying! Vviiiiiiizzz...\n\n" + \
          "Default path is set to: " + sc.sticky["Ladybug_DefaultFolder"]

Let's get ride of the os.getenv("USERNAME").

Ladybug is now flying!

But: I get a bunch of errors, for example when trying to use the "Download EPW" module:

Runtime error (ImportException): No module named fcntl

Traceback:
  line 430, in <module>, "/Applications/RhinoWIP.app/Contents/Resources/ManagedPlugIns/RhinoDLR_Python.rhp/Lib/subprocess.py"
  line 9, in <module>, "/Applications/RhinoWIP.app/Contents/Resources/ManagedPlugIns/RhinoDLR_Python.rhp/Lib/webbrowser.py"
  line 45, in script

So, the problem is that subprocess.py calls fcntl.py which doesn't exist.

Using mono on mac, I ran the same IronPython version as Rhino (2.7.5) and found the same problem. Then I used the latest stable version: 2.7.6.3. Import of subprocess works. So I copied the Lib/subprocess.py rom the 2.7.6.3 over to overwrite the one located at /Applications/RhinoWIP.app/Contents/Resources/ManagedPlugIns/RhinoDLR_Python.rhp/Lib/. The download EPW module now doesn't crash (even though it doesn't do jack squat either).

link

Comments

Seems like it was already modified on Ladybug's github: ladybug_ladybug.py#L6575

Julien Marrec's avatar Julien Marrec  ( 2016-11-09 03:09:52 -0600 )

I think I should move this into the original question?

Julien Marrec's avatar Julien Marrec  ( 2016-11-09 04:53:48 -0600 )

Hum, don't mind this question for now unless you have insight... I'll use it as a notepad to document my tribulations for now, and I'll try to clean it up afterwards

Julien Marrec's avatar Julien Marrec  ( 2016-11-09 06:36:29 -0600 )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2016-11-09 02:38:50 -0600

Seen: 2,370 times

Last updated: Nov 09 '16