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

Error importing csv with Schedule:File

asked 2025-02-03 04:53:39 -0600

ClemGre's avatar

updated 2025-02-03 09:09:32 -0600

Hello, I am using EnergyPLus 24.2. I have always been used to saving my schedules in CSV format and using the "schedule:file" command. I have never had any issues with previous versions before version 24.2. However, with version 24.2, when doing the same thing as usual, I get:

* Severe * [json.exception.out_of_range.401] array index 3 is out of range

My csv file has 3 columns.

Does anyone else have the same problem?

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2025-02-05 02:51:28 -0600

Line 4622, you have an extra field.

12/07/2023 11:00;480;288;
12/07/2023 12:00;480;288;1
12/07/2023 13:00;480;288;

Remove the extra "1", and ta-daaaaa, your file runs.


Figured it out by trying to load it in a Pandas dataframe to inspect it.

In [1]: import pandas as pd
In [2]: pd.read_csv('Schedule_file.csv', sep=';')
[...]
ParserError: Error tokenizing data. C error: Expected 3 fields in line 4622, saw 4
edit flag offensive delete link more

Comments

Yes, indeed, that was a mistake on my part that I hadn't noticed. Something must have changed between versions 24.1 and 24.2 of EnergyPlus because I didn't have any errors with the same CSV file before.

In any case, thank you very much for your help and advice!

ClemGre's avatar ClemGre  ( 2025-02-05 04:12:09 -0600 )edit
1

answered 2025-02-03 09:13:38 -0600

@ClemGre It's hard to confirm without seeing your IDF or CSV defining schedule data, but I've seen this error before when the CSV file has a column(s) that are missing text in the header row at the top that labels the column.

edit flag offensive delete link more

Comments

I just checked, and no, there is no missing text in the headers of my CSV. I would like to make my IDF file and CSV available, but I can't because I have less than 10 points (?).

ClemGre's avatar ClemGre  ( 2025-02-03 15:39:29 -0600 )edit

@ClemGre you can upload the IDF, CSE and error (ERR) files to a file sharing/storage service like Dropbox, then provide the URL(s) here for others to access.

Aaron Boranian's avatar Aaron Boranian  ( 2025-02-03 18:13:17 -0600 )edit

Thank You Aaron Boranian. You can find the files here : link text

ClemGre's avatar ClemGre  ( 2025-02-04 09:49:35 -0600 )edit

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: 2025-02-03 04:53:39 -0600

Seen: 65 times

Last updated: Feb 05