Page 1 of 1

IES silently crashes when getting internal gain data

Posted: Wed Jan 08, 2020 3:36 pm
by jon_rey
I’ve been experimenting with the Python API, trying to retrieve different variables from the model with mixed success. I’m having problems with a VEScript causing IES to completely crash and close down without any error or warning prompts. I believe the problem is triggered by calling .get() on InternalGain objects.

We’ve tested scripts on multiple models and there doesn’t seem to be any consistency between the script successfully terminating and causing a crash. The script below is a fairly minimal example, it has worked in the past but after closing and reopening the model, the same script then causes a crash. I’ve had similar problems with the show_casual_gains.py example script provided with the software.

Has anyone else come across silent crashes when doing this (or any) function call and has any advice?

Code: Select all

import iesve

ve_project = iesve.VEProject.get_current_project()
# selects the real model
model = ve_project.models[0]
# gets a list of all spaces
bodies = model.get_bodies_and_ids(False)
# selects a sample room from that list
body = bodies['SP00000C'] #CHANGE BASED ON YOUR MODEL

# retrieves a list of internal gain objects associated with just a single space
test = body.get_room_data().get_internal_gains()
gain1 = test[0] # RoomLightingGain object
gain2 = test[1] # RoomPeopleGain object
gain3 = test[2] # RoomEnergyGain object

print(gain2.get())
Thanks
Jon

Re: IES silently crashes when getting internal gain data

Posted: Tue Jan 14, 2020 9:03 am
by Rhind
Hi,

I tried your sample but wasn't able to reproduce the issue unfortunately. However I've logged it in our system for further investigation.

If you could send one of the models you know can produce the issue to support, that would be useful in tracking it down.

Re: IES silently crashes when getting internal gain data

Posted: Wed May 13, 2020 1:43 pm
by jon_rey
Just to close this thread out:

I sent the model file over to the team at support and they couldn't replicate my error. After a bit more testing myself, it seemed to be down to the way I opened the IES model. Opening from recents caused crashes whereas opening by fully selecting the original file path did not.

As mentioned in the original post, this is only caused by calling .get() on an internal gain object and was caused by a variety of scripts including one of the example scripts.

Hopefully this is useful for anyone else having the same issues / the IES developers.