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

eppy with EnergyPlus 8.5 and 'charmap' codec error

asked 2016-09-27 10:50:21 -0500

I am attempting to run eppy to calculate the floor area of a zone. However, my idf file is EnergyPlus 8.5. I noticed the documentation refers to the resources folder for EnergyPlus up to version 8.1.

Does eppy support EnergyPlus 8.5?

If it does, can someone help me with the below error I receive when trying to load an idf file?

UnicodeEncodeError: 'charmap' codec can't encode characters in position 26-27: character maps to <undefined>

Looking online it appears to be an encoder error, like there is an unsupported symbol in the idf file. However, if that were the case I would likely not be able to run EnergyPlus. I have checked the file and the encoder is utc-8. So I'm not sure if the error is related to me or support for EnergyPlus 8.5.

Best, Justin

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-09-27 11:32:21 -0500

updated 2016-09-27 11:51:56 -0500

You're right, Eppy is failing to read the IDD for EnergyPlus 8.5, so for now yes, it's unsupported.

Update My bad, I'd accidentally changed the encoding on my installed version of 8.5 and it had messed something up. Reinstalling EnergyPlus restored the original encoding and there's now no problem running Eppy with EnergyPlus 8.5.

My suggestion is to reinstall EnergyPlus 8.5, but I've made an issue on the Eppy GitHub page in case this doesn't work.

edit flag offensive delete link more

Comments

Hi @Jamie Bull, thank you for your repsonse. If I reinstalled EnergyPlus would it called through the IDD file in the EPPY script or is there a system path that needs to be adjusted too? Due to some work with FMUs I use both 64 and 32 bit EnergyPlus. Additionally, how did you acccidentally change your encoding? I would like to avoid the problem in the future, if possible. Best, Justin.

JustinShultz's avatar JustinShultz  ( 2016-09-28 07:55:26 -0500 )edit
1

Hi @JustinShultz, I think what I did was messing around with encodings to try and add the 8.5 IDD into eppy (as is done with iddv800.py for v8.0.0). My IDE wasn't keen on my pasting in the contents of the IDD so I tried converting to UTF8 or to ANSI in Notepad++, on what I thought was a backup but obviously wasn't.

In the current version of Eppy you have to set the IDD file when you create a new IDF. So you do something like: from eppy.modeleditor import IDF then IDF.setiddname(<path_to_IDD>) before doing anything else. Reinstalling won't change that.

Jamie Bull's avatar Jamie Bull  ( 2016-09-28 08:40:47 -0500 )edit

Hi @Jamie Bull, apologizes but I'm a bit confused now. I've been selecting the default IDD file in my EnergyPlus installation. You were able to run Eppy using EnergyPlus 8.5 after you reinstalled? Do you have any ideas why I would be receiving the encoding error when I have not changed my IDD file?

JustinShultz's avatar JustinShultz  ( 2016-09-29 08:13:48 -0500 )edit
1

Yes, I've been using the default IDD as well with no trouble at all. Can you provide the full traceback you see when you get the error? Also what version of Eppy and Python are you using?

Jamie Bull's avatar Jamie Bull  ( 2016-09-29 08:41:04 -0500 )edit
1

So this is embarrassing, as I was reviewing my python code to post in my question I realized that I had accidently tried importing my .fmu file instead of my .idf file. After I corrected the IDF file path to an .idf file the model was loaded with no issues. Thank you for your thorough review of my question. I will mark your reply as the answer.

JustinShultz's avatar JustinShultz  ( 2016-09-29 10:44:46 -0500 )edit

Your Answer

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

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2016-09-27 10:50:21 -0500

Seen: 179 times

Last updated: Sep 27 '16