feigensp/Prophet

Cannot view legacy Prophet experiment

Closed this issue · 5 comments

I loaded a legacy experiment file (an experiment created with an older Prophet version) in the editor and saved it as a new file. Nevertheless, the viewer is not able to open the new file and returns the error No valid experiment file!.

See https://gist.github.com/hschink/e38d6d4797fc991043bb for the file.

Was the error message 'Not a valid experiment file!'? If so, the error message indicates that the file could not be deserialised. The XML you posted however conforms to the expected format as defined in de.uni_passau.fim.infosun.prophet.util.qTree.handlers.Experiment.xsd. This should guarantee that deserialisation is possible.
I could not reproducte the error, the Viewer loaded and executed the experiment just fine.. Could you post the console output before the error? If this a deserialisation problem there should be System.err output describing the problem with the XML format.

@GSeibt Sorry, I forgot about that. Here is the error message shown on the console:

The file MLR_de_ng.xml is invalid according to CurrentValidator
Cause:
Ungültiges Byte 2 von 2-Byte-UTF-8-Sequenz.
The file MLR_de_ng.xml is invalid according to LegacyValidator
Cause:
cvc-elt.1: Deklaration des Elements "QTreeNode" kann nicht gefunden werden.

Ok, the second error (concerning LegacyValidator) is to be expected since the XML has the new format. (It should of course not occur because the file is checked against the new format first.)
The first error is very wierd. The message (most propably) indicates that the deserialiser was fed ISO-8859 when it was expecting UTF-8. At some point between saving the experiment in your Editor and opening it with your Viewer the file encoding broke. I am not shure whether uploading the file to a gist changes the file encoding but what I downloaded uses UTF8 without BOM. That is the format the serialiser is supposed to produce. As I said, there are no errors deserialising the file.
Could you check that your file uses UTF8 w/o BOM encoding? Just open it in Notepad++ or something and if not convert it to UTF8 w/o BOM.
I am currently working on specifying this format explicitly as the encoding everywhere I do file IO. Should have a new version out later in the day.

Try saving the experiment with the new 0.9.5.1 release and then opening it. I was able to open the old-style experiment that I received from Janet via Email. I then saved it and executed it using the Viewer.

Release https://github.com/feigensp/Prophet/tree/V0.9.5.1 fixes the issue for me. 👍 Thanks a lot!