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

Running Energy Plus EPBunch Error with Python

asked 4 years ago

Mehdiabdolvand's avatar

updated 4 years ago

Hello every one, I ran into an error while I was editing an existing idf file with eppy module in python. I'm changing material properties through a loop but I can't save the edited version of idf file or run it because I ran into this error"int() argument must be a string, a bytes-like object or a number, not 'EpBunch'". Is there any one knows how to solve this?
int() argument must be a string, a bytes-like object or a number, not 'EpBunch'

Preview: (hide)

Comments

I think you would have to show us the code that does this. I would suggest trying to replicate the problem with as few lines of code is the best way for us to help.

JasonGlazer's avatar JasonGlazer  ( 4 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 4 years ago

Adrien's avatar

EpBunch is the python class that eppy defines for representing an energyplus object. My first guess would be that you maybe try to reference an object from another object and you wrote something like:

object_2.Zone_Name = object_1

In that case, you probably want this instead:

object_2.Zone_Name = object_1.Name

Because the attribute value must be a string or an integer, not a Python class instance. But as Jason said, without the code it's difficult to know what is wrong.

Preview: (hide)
link

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

Stats

Asked: 4 years ago

Seen: 159 times

Last updated: Jan 22 '21