Closed jessemphillips closed 7 years ago
@jessemphillips I checked one of our solutions with diagnostic files and I didn't get this error. The grep command is referring to the contents of the zip, not the contents of the solution. As far as I can see, the diagnostic files only exist in the folder and not in the zip. Therefore, they shouldn't cause the problem.
Could you give me a list of the filenames inside your solution file?
Here is a screenshot of the contents of an example zip pulled from Connect.
In here, the binding contingencies xml is placed inside the zip along with the solution xml. The grep command runs into an issue where it catches the binding contingencies xml first and the read-in fails due to the unexpected format of that file.
For example, if binding contingencies diagnostics is also output as part of the solution, there will be another xml file in addition to the model solution. Processing the solution will produce an error like the following:
The error occurs at line 32 of process_solution.R where
grep("^Model.*xml$", zip.content$Name)
returns the first chronological xml file (e.g. Model ( example ) BindingContingencies Diagnostics.xml). I suggest modifying the line 32 search togrep("^Model.*Solution.xml$", zip.content$Name)
to ensure process_solution.R picks up the intended solution file instead of any diagnostic files that may be present.