Importing Ladybug library in GHPython

Hey,

I am trying to use the ladybug library (PyPi) in GH Python. I also want to use the EPPY library to run EnergyPlus simulation.

I’ve installed the ladybug and eppy libraries through pip install.
I have added the path to grasshopper and it now shows:

[‘C:\Users\gupta\Desktop\My Cloud Offline Files\MSSD\Spring Semester\Design Computation\Assignments’, ‘C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib’, ‘C:\Users\gupta\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib’, ‘C:\Users\gupta\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts’, ‘C:\Users\gupta\AppData\Local\Programs\Python\Python37-32\Lib\site-packages’]

I wrote the following code so far based on the GitHub Usage section:

from ladybug.epw import EPW
weather_data = EPW(epw_path)
print(weather_data)

location = weather_data.Location
print(location)

It’s giving me this error:
Runtime error (MissingMemberException): ‘module’ object has no attribute ‘isplus’

Traceback:
line 22, in , “C:\Users\gupta\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\ladybug\sunpath.py”
line 10, in , “C:\Users\gupta\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\ladybug\designday.py”
line 5, in , “C:\Users\gupta\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\ladybug\epw.py”
line 8, in , “C:\Users\gupta\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\ladybug_comfort_extend_ladybug.py”
line 14, in , “C:\Users\gupta\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\ladybug_comfort_init_.py”
line 37, in import_module, “C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\importlib_init_.py”
line 13, in , “C:\Users\gupta\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\ladybug_init_.py”
line 48, in script

Also, the last time I tried to do this, I had added .dll and .gha files in a folder and added the path. This is also consistent with the discussion here:

That had worked but I am not sure where to find the .dll and .gha files for ladybug and eppy.

The goal of doing this is to set up energy and environmental simulation using python and not the GH Components. I would like to try simulating the incident solar radiation/SED, zone wise loads, heat gain and heat losses for each zone, etc.
I found that ladybug and honeybee have python modules that can be used outside the GH environment. Also, EnergyPlus IDF files can be modified using EPPY. I was trying to use a combination to try simulating using Python. Finally, I want to automate multiple simulations based on changes in input parameters.

Thank You.

You should post this question to ladybug tools discourse forum: http://discourse.ladybug.tools/

You can address the issue by adding isplus attribute to the module which for some reason is missing. Ladybug uses this attribute to see if you run the study from insider Grasshopper/ Dynamo.

What is the version of ladybug that you have installed? This should be already set for you when you load the library:

I used the files that were loaded when I did
pip install lbt-ladybug on my command prompt.

I have just downloaded the python files from github and used them to override the existing python scripts in the Rhino Scripts folder. I also opened the init file in sublime text editor to check if this line exists and it does. Yet I am getting the same error message

Thanks!