"unexpected end of file" error in AMPL read statement

767 views
Skip to first unread message

Robert Fourer

unread,
Mar 14, 2007, 1:26:09 PM3/14/07
to am...@googlegroups.com, Peter Lindroth, Steven Harrod, Laurent Charlin

Several users have reported situations where AMPL's "read" command reports
"unexpected end of file" although the file being read appears correct. This
behavior was due to a bug which has now been fixed.

We hope to soon have an automated web site where users covered by AMPL
maintenance can download updated versions incorporating all of the latest
fixes. (Maintenance is free the first year and 15% of the purchase price per
year after that.)

Bob Fourer
4...@ampl.com


mahraz amini

unread,
Jul 5, 2016, 1:09:01 PM7/5/16
to AMPL Modeling Language, peter.l...@math.chalmers.se, a2s...@aol.com, lcha...@cs.uwaterloo.ca, 4...@ampl.com
I still have the same issue, is there any way that I can fix this?

Thanks

Robert Fourer

unread,
Jul 9, 2016, 8:37:56 AM7/9/16
to am...@googlegroups.com
Normally "unexpected end of file" means that the number of values that you are asking an AMPL "read" command to read from a file is greater than the number of values in the file. As a result, the "read" command reaches the end of the file before it is done. This is a normal error message indicating that there is an error in the command or there is not enough data in the file.

There was a bug that caused "unexpected end of file" appeared to appear even though the command and the file were correct, but that bug was fixed many years ago. If you can post some files that can enable us to reproduce the situation where you see this message, however, then we may be able to determine why you are having this issue.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of mahraz amini
Sent: Tuesday, July 5, 2016 12:09 PM
To: AMPL Modeling Language
Cc: peter.l...@math.chalmers.se; a2s...@aol.com; lcha...@cs.uwaterloo.ca; 4...@ampl.com
Subject: [AMPL 12270] Re: "unexpected end of file" error in AMPL read statement

I still have the same issue, is there any way that I can fix this?

=======
Reply all
Reply to author
Forward
0 new messages