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

running energy plus in python using eppy

asked 2 years ago

updated 2 years ago

I am trying to run EnergyPlus in Python using eppy. here is the code.

idf_file = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/Dublin_1_House_2occV960_final.idf"
IDF.setiddname('/Applications/EnergyPlus-9-6-0/Energy+.idd')
idf = IDF(idf_file)
epw_path = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/IRL_DublinIWEC.epw"
idf.epw(epw_path)
output_directory = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial"
run(idf, output_directory = output_directory)

But when I run this code I got the following error


AttributeError                            Traceback (most recent call last)
/var/folders/24/kygczx3976d_r0xjqw14drvh0000gn/T/ipykernel_44774/2674705698.py in <module>
  1 epw_path = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/IRL_DublinIWEC.epw"
----> 2 idf.epw(epw_path)
  3 output_directory = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial"
  4 run(idf, output_directory = output_directory)

AttributeError: 'IDF' object has no attribute 'epw'

Can someone please help me with this?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 2 years ago

santoshphilip's avatar

untested code. I think should work:

idf_file = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/Dublin_1_House_2occV960_final.idf"
IDF.setiddname('/Applications/EnergyPlus-9-6-0/Energy+.idd')
epw_path = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/IRL_DublinIWEC.epw"
idf = IDF(idf_file, epw_path)
output_directory = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial"
idf.run(output_directory=output_directory)
Preview: (hide)
link

Comments

It worked. Thanks.

divsood04's avatar divsood04  ( 2 years ago )

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: 2 years ago

Seen: 356 times

Last updated: Mar 02 '23