arnodelorme / mffmatlabio

MFF Matlab file importer and exporter
GNU General Public License v3.0
11 stars 15 forks source link

MFF Import Issue After Multiple Fix Attempts #34

Closed rpriefer closed 3 years ago

rpriefer commented 3 years ago

Hello Arno,

Trey Avery directed me here as, while attempting to import some .mff files into EEGLAB. We tried a few methods ourselves as directed by you and Trey, and finally Trey took the files himself to fix. It worked for half but the other half still spit out the following error on the GUI:

mff_importevents (line 62) error

Java exception occurred: com.egi.services.mff.utility.ResourcesUnmarshalException: could not parse from xml resource at com.egi.services.mff.utility.XMLUtil.getDocumentFromURI(XMLUtil.java:124) at com.egi.services.mff.utility.XMLLocalFileResource.unmarshal(XMLLocalFileResource.java:2027) at com.egi.services.mff.api.MFFResource.loadResource(MFFResource.java:156)

(Error occurred in function mff_importevents() at line 62)

And the following error in the command window: [Fatal Error] Events_DIN_1.xml:11:26: Invalid byte 1 of 1-byte UTF-8 sequence. MFFRootDoc: error: org.xml.sax.SAXParseException; systemId: file:/Applications/MATLAB_Plugins/1504_AV%20.mff/Events_DIN_1.xml; lineNumber: 11; columnNumber: 26; Invalid byte 1 of 1-byte UTF-8 sequence.

Many thanks,

arnodelorme commented 3 years ago

Would you mind to share a test file?

rpriefer commented 3 years ago

Good afternoon,

sure, see attached! Arno_MFF Files.zip https://drive.google.com/file/d/1taAeu-yrMznq84Slgle95F1xnOUd9oMJ/view?usp=drive_web

On Mon, Jan 4, 2021 at 2:35 PM Arnaud Delorme notifications@github.com wrote:

Would you mind to share a test file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arnodelorme/mffmatlabio/issues/34#issuecomment-754172841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOA2OUUWMCGTUWCFG2PDBN3SYIJ7JANCNFSM4VTODHIQ .

-- Ryan Priefer Lab Technical Coordinator Communication Sciences and Disorders t: 516.877.6787

arnodelorme commented 3 years ago

I have looked at the file and the is with the (TM) character in the event files Events_DIN_1.xml. Remove this character and the file can be imported. I will also notify Trey because the problem is with the EGI Java library.

arnodelorme commented 3 years ago
Screen Shot 2021-01-04 at 11 37 42 AM
arnodelorme commented 3 years ago

One of your file above.

rpriefer commented 3 years ago

Hi Arno, Thanks for the help, this is great news. My only question is - where is this TM character? I don't see it in the file name, but where is it in the actual file?

On Mon, Jan 4, 2021 at 4:38 PM Arnaud Delorme notifications@github.com wrote:

One of your file above.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arnodelorme/mffmatlabio/issues/34#issuecomment-754235379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOA2OUVDPBUJ3DUNLHVZPV3SYIYNZANCNFSM4VTODHIQ .

-- Ryan Priefer Lab Technical Coordinator Communication Sciences and Disorders t: 516.877.6787

arnodelorme commented 3 years ago

Yes, you need to edit the file and replace the characters with blank or simply remove them.

On Jan 4, 2021, at 12:21 PM, rpriefer notifications@github.com wrote:

Hi Arno, Thanks for the help, this is great news. My only question is - where is this TM character? I don't see it in the file name, but where is it in the actual file?

On Mon, Jan 4, 2021 at 4:38 PM Arnaud Delorme notifications@github.com wrote:

One of your file above.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arnodelorme/mffmatlabio/issues/34#issuecomment-754235379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOA2OUVDPBUJ3DUNLHVZPV3SYIYNZANCNFSM4VTODHIQ .

-- Ryan Priefer Lab Technical Coordinator Communication Sciences and Disorders t: 516.877.6787 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

rpriefer commented 3 years ago

Hello, It isn't working. I don't see any TM character - only these question mark boxes of sorts. I've tried replacing them with a blank and a bullet and neither changes when i attempt to import into matlab. is it only in that one .xlm file or is it in multiple?

On Mon, Jan 4, 2021 at 5:32 PM Arnaud Delorme notifications@github.com wrote:

Yes, you need to edit the file and replace the characters with blank or simply remove them.

On Jan 4, 2021, at 12:21 PM, rpriefer notifications@github.com wrote:

Hi Arno, Thanks for the help, this is great news. My only question is - where is this TM character? I don't see it in the file name, but where is it in the actual file?

On Mon, Jan 4, 2021 at 4:38 PM Arnaud Delorme notifications@github.com wrote:

One of your file above.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/arnodelorme/mffmatlabio/issues/34#issuecomment-754235379 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOA2OUVDPBUJ3DUNLHVZPV3SYIYNZANCNFSM4VTODHIQ

.

-- Ryan Priefer Lab Technical Coordinator Communication Sciences and Disorders t: 516.877.6787 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arnodelorme/mffmatlabio/issues/34#issuecomment-754263288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOA2OUUENXCG3USWHF7K273SYI6W7ANCNFSM4VTODHIQ .

-- Ryan Priefer Lab Technical Coordinator Communication Sciences and Disorders t: 516.877.6787

arnodelorme commented 3 years ago

[Uploading Events_DIN_1.xml.zip…]()

arnodelorme commented 3 years ago

I have only tried the "1504_AV .mff” file and this is the file I changed

mamoran66 commented 3 years ago

Arno,

The copy of the event file I found had a non-xml line as the first line:

@Window: 223_43_311_564_13188733_1_13188918_0_13188918_0

That rectified the issue here but note, while the issue with non-ascii characters still remains in the MFF API, The latest version of Net Station is better at dealing with the issue, that may explain why we did not see the TM issue you saw.

arnodelorme commented 3 years ago

This is strange. To see the TM issue, you need to use a text editor (notepad on Windows for example) or the Matlab editor. Closing again the issue unless you think there is something else I can do. Cheers.